@charset "UTF-8";
:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #fff; --sidebar: #f9fafb; --soft: #f0f2f6;
  --text: #20232b; --muted: #656c7b; --border: #dce0e8;
  --accent: #285dbb; --accent-hover: #204fa3; --accent-soft: #e8effc;
  --action: #315fd5; --action-hover: #244eb8; --on-action: #fff; --focus: #497de8;
  --danger: #a63b45; --danger-soft: #fff0f1; --amber: #805c16; --amber-soft: #f7eedb;
  --blue: #285dbb; --blue-soft: #e8effc; --radius: .5rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111216; --surface: #1b1d23; --sidebar: #14151a; --soft: #23262e;
    --text: #edf0f7; --muted: #a3a9b7; --border: #353944;
    --accent: #91b4ff; --accent-hover: #bbd0ff; --accent-soft: #233351;
    --action: #3768df; --action-hover: #487af0; --focus: #8db1ff;
    --danger: #f3a5ae; --danger-soft: #3b252c; --amber: #e6c27b; --amber-soft: #382f22;
    --blue: #91b4ff; --blue-soft: #233351;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111216; --surface: #1b1d23; --sidebar: #14151a; --soft: #23262e;
  --text: #edf0f7; --muted: #a3a9b7; --border: #353944;
  --accent: #91b4ff; --accent-hover: #bbd0ff; --accent-soft: #233351;
  --action: #3768df; --action-hover: #487af0; --focus: #8db1ff;
  --danger: #f3a5ae; --danger-soft: #3b252c; --amber: #e6c27b; --amber-soft: #382f22;
  --blue: #91b4ff; --blue-soft: #233351;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button,input,textarea,select { font: inherit; }
button,a,input,select,textarea { touch-action: manipulation; }
button,a { transition: background-color .15s, color .15s, border-color .15s; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 1.875rem; line-height: 1.25; letter-spacing: -.04em; font-weight: 650; }
h2 { font-size: 1.0625rem; font-weight: 650; letter-spacing: -.015em; }
h3 { font-size: .9375rem; font-weight: 600; }
svg { flex-shrink: 0; }
.icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute!important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--surface); padding: 1rem; }
.skip-link:focus { top: 1rem; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent); }
.eyebrow { font-size: .75rem; letter-spacing: .08em; font-weight: 600; color: var(--muted); margin-bottom: .75rem; }
.text-link { color: var(--accent); font-size: .875rem; font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.full-width { width: 100%; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.mono,.ticket-number,.stat strong { font-family: "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.count,.heading-count { font-size: .75rem; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; border-radius: .25rem; background: var(--soft); color: var(--muted); padding: 0 .375rem; }
.heading-count { vertical-align: middle; margin-left: .5rem; }
.app-shell { display: grid; grid-template-columns: 13rem minmax(0,1fr); min-height: 100svh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--border); padding: 1.5rem .75rem 1rem; position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 .5rem; font-size: 1.75rem; font-weight: 700; letter-spacing: -.045em; line-height: 1.15; }
.brand-mark { width: 2.5rem; height: 2.5rem; object-fit: contain; flex-shrink: 0; }
.brand-caption { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; letter-spacing: 0; margin-top: .375rem; line-height: 1.4; }
.workspace-label { font-size: .6875rem; letter-spacing: .1em; color: var(--muted); margin: 2.25rem .75rem .75rem; }
.main-nav { display: flex; flex-direction: column; gap: .375rem; }
.main-nav a { display: flex; gap: .875rem; align-items: center; padding: .75rem; border-radius: .375rem; color: var(--muted); font-size: .9375rem; font-weight: 500; }
.main-nav a:hover { background: var(--soft); color: var(--text); }
.main-nav a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.sidebar-bottom { margin-top: auto; padding-top: 2rem; }
.theme-label { display: block; color: var(--muted); font-size: .75rem; margin: 0 .5rem .5rem; }
.theme-select { font-size: .8125rem; margin-bottom: 1.25rem; width: 100%; }
.account { border-top: 1px solid var(--border); padding: 1.25rem .5rem .75rem; display: flex; gap: .625rem; align-items: center; }
.account strong { display: block; font-size: .8125rem; font-weight: 600; overflow-wrap: anywhere; }
.account div>span { display: block; color: var(--muted); font-size: .75rem; }
.avatar { width: 2.25rem; height: 2.25rem; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--text); border-radius: 50%; font-size: .8125rem; font-weight: 600; }
.avatar.small { width: 1.75rem; height: 1.75rem; font-size: .6875rem; }
.logout { display: flex; align-items: center; gap: .75rem; background: none; border: 0; color: var(--muted); padding: .625rem .75rem; font-size: .8125rem; min-height: 2.75rem; }
.logout:hover { color: var(--text); }
.workspace { display: flex; flex-direction: column; min-width: 0; }
.topbar { min-height: 4rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 2rem; font-size: .8125rem; color: var(--muted); }
.separator { margin: 0 .75rem; }
.topbar-date { white-space: nowrap; }
.content { padding: 2rem; max-width: 100rem; width: 100%; margin: 0 auto; flex: 1; min-width: 0; }
.site-credit { padding: 1rem 1.5rem 1.25rem; text-align: center; color: var(--muted); font-size: .75rem; line-height: 1.5; letter-spacing: .025em; }
.site-credit strong { font-weight: 600; }
.site-credit-login { position: absolute; inset: auto 0 .25rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
.page-heading h1 { margin-bottom: .5rem; }
.page-heading p.muted { font-size: .875rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border: 1px solid transparent; border-radius: .375rem; min-height: 2.75rem; padding: .625rem 1rem; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.button.primary { background: var(--action); color: var(--on-action); }
.button.primary:hover { background: var(--action-hover); }
.button.secondary { border-color: var(--border); background: transparent; color: var(--text); }
.button.secondary:hover { background: var(--soft); }
.button.compact { font-size: .8125rem; padding: .5rem .75rem; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; gap: 1rem; }
.panel-heading p { font-size: .8125rem; margin-top: .375rem; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--border); margin-bottom: 1.75rem; }
.stat { padding: .5rem 1.5rem 1.5rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border: 0; }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .8125rem; }
.stat-label .icon { width: 1rem; height: 1rem; }
.stat strong { font-size: 2rem; letter-spacing: -.05em; font-weight: 500; line-height: 1.2; }
.stat>.muted { font-size: .75rem; }
a.stat:hover { background: var(--soft); }
.attention { display: flex; align-items: center; gap: .75rem; color: var(--amber); border-left: 2px solid var(--amber); padding: .75rem 1rem; font-size: .8125rem; margin-bottom: 1.75rem; }
.attention a { font-weight: 600; margin-left: auto; white-space: nowrap; }
.attention a:hover { text-decoration: underline; }
.table-scroll { overflow: auto; position: relative; }
.ticket-table { border-collapse: collapse; width: 100%; font-size: .875rem; text-align: left; }
.ticket-table th { color: var(--muted); font-weight: 400; padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); font-size: .75rem; white-space: nowrap; }
.ticket-table td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ticket-table tbody tr:last-child td { border-bottom: 0; }
.ticket-table tr:hover td { background: var(--soft); }
.ticket-number { color: var(--accent); font-weight: 500; font-size: .8125rem; white-space: nowrap; }
.ticket-number:hover,.address-link:hover { text-decoration: underline; }
.cell-secondary { display: block; color: var(--muted); margin-top: .25rem; font-size: .8125rem; }
.summary { max-width: 25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address-link { font-weight: 550; display: block; min-width: 11rem; }
.person { display: inline-flex; gap: .5rem; align-items: center; font-size: .8125rem; }
.ticket-table .person { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 500; padding: .25rem .5rem; border-radius: .25rem; white-space: nowrap; border: 1px solid transparent; }
.badge.large { padding: .5rem .875rem; }
.status-new { color: var(--text); background: var(--soft); border-color: var(--border); }
.status-in_progress { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.status-waiting { color: var(--amber); background: var(--amber-soft); }
.status-done { color: var(--muted); background: var(--soft); }
.status-cancelled { color: var(--danger); background: var(--danger-soft); }
.priority-label { display: block; color: var(--danger); margin-top: .375rem; font-size: .75rem; }
.date-cell { white-space: nowrap; }
.overdue,.overdue .cell-secondary { color: var(--danger); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state>.icon { width: 2rem; height: 2rem; margin-bottom: 1rem; }
.empty-state h3 { color: var(--text); margin-bottom: .5rem; }
.empty-state p { font-size: .875rem; }
input:not([type="checkbox"]):not([type="hidden"]),textarea,select { border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: .375rem; padding: .625rem .75rem; min-height: 2.75rem; max-width: 100%; }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; min-height: 5rem; }
select { padding-right: .75rem; }
select option { background: var(--surface); color: var(--text); }
.field { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.field label { font-size: .8125rem; font-weight: 500; }
.field input,.field select,.field textarea { width: 100%; }
.errorlist { list-style: none; padding: .75rem 1rem; margin: 0; border-radius: .375rem; color: var(--danger); background: var(--danger-soft); font-size: .8125rem; }
.error-summary { margin-top: 1rem; background: var(--danger-soft); color: var(--danger); padding: .75rem; font-size: .875rem; }
.filters { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.search-field { display: flex; align-items: center; position: relative; flex: 1; min-width: 15rem; }
.search-field>.icon { position: absolute; left: .875rem; color: var(--muted); }
.search-field input { width: 100%; padding-left: 2.75rem!important; }
.filters select { font-size: .8125rem; }
.checkbox-label { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-size: .8125rem; min-height: 2.75rem; }
.checkbox-label input { width: 1rem; height: 1rem; accent-color: var(--action); }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--muted); gap: 1rem; }
.pagination>div { display: flex; gap: 1rem; align-items: center; }
.create-form { max-width: 52rem; }
.create-form section { padding: 1.75rem; }
.create-form section>p { font-size: .8125rem; margin: .5rem 0 1.75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.span-two { grid-column: span 2; }
.form-footer { border-top: 1px solid var(--border); padding: 1.25rem 1.75rem; display: flex; justify-content: flex-end; gap: .75rem; }
.notice { padding: .75rem 1rem; border: 1px solid var(--border); border-radius: .375rem; background: var(--accent-soft); margin-bottom: 1.5rem; color: var(--accent); font-size: .875rem; }
.section-title { display: flex; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.section-padding { padding: 1.5rem; }
.section-padding>.stack { margin-top: 1.25rem; }
.assigned-person { margin-top: .75rem; }
.assigned-person strong { display: block; font-size: .875rem; }
.assigned-person .muted { display: block; font-size: .75rem; }
.assignment { margin-top: 1rem; }
.assignment summary { font-size: .8125rem; color: var(--accent); cursor: pointer; padding: .25rem 0; }
.assignment form { margin-top: 1rem; }
.section-padding>.pagination { padding: 1rem 0 0; margin-top: 1.25rem; }
.board-scroll { overflow: auto; padding-bottom: 1rem; }
.board { display: grid; grid-template-columns: repeat(4,minmax(15rem,1fr)); gap: 1rem; min-width: 65rem; }
.board-column { border-top: 2px solid var(--border); padding: .875rem .25rem; min-height: 26rem; }
.column-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.column-heading h2 { font-size: .875rem; font-weight: 500; }
.column-cards { display: flex; flex-direction: column; gap: .75rem; }
.board-card { position: relative; background: var(--surface); padding: 1rem; border: 1px solid var(--border); border-radius: .5rem; }
.board-card[draggable="true"] { cursor: grab; }
.board-card:hover { border-color: var(--muted); }
.card-meta { display: flex; gap: .5rem; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.priority-tag { color: var(--danger); font-size: .75rem; }
.board-card h3 { font-size: .9375rem; line-height: 1.45; margin-bottom: .5rem; }
.board-card h3 a:hover { text-decoration: underline; }
.card-task { font-size: .8125rem; color: var(--muted); margin-bottom: .875rem; overflow-wrap: anywhere; }
.subscriber-label { font-size: .75rem; color: var(--muted); margin-bottom: 1rem; }
.board-card footer { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding-top: .875rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.card-date { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.card-date.overdue { color: var(--danger); }
.column-empty { text-align: center; font-size: .8125rem; color: var(--muted); padding: 2rem .75rem; }
.column-more { display: block; margin: 1rem .25rem .25rem; }
.board-footnote { font-size: .8125rem; color: var(--muted); margin-top: .75rem; }
.board-card.dragging { opacity: .45; }
.board-column.drop-target { border-color: var(--accent); }
dialog { border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); color: var(--text); width: min(28rem,calc(100% - 2rem)); padding: 1.75rem; }
dialog::backdrop { background: #07090eb3; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .75rem; }
.login-page { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1rem 4.5rem; gap: 2rem; }
.login-card { width: 100%; max-width: 27rem; padding: 2.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: .75rem; }
.login-card h1 { font-size: 1.75rem; margin-bottom: .75rem; }
.login-card>p.muted { font-size: .875rem; margin-bottom: 1.75rem; }
.login-help { font-size: .8125rem; color: var(--muted); margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.login-footer { font-size: .8125rem; color: var(--muted); }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 11.5rem minmax(0,1fr); }
  .content { padding: 1.5rem; } .topbar { padding: 1rem 1.5rem; }
  .ticket-table td,.ticket-table th { padding: 1rem; }
  .stat-label>.icon { display: none; }
}
@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar { height: auto; position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; padding: 1rem; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { font-size: 1.5rem; padding: 0; } .brand-caption,.workspace-label { display: none; }
  .main-nav { flex-direction: row; gap: .25rem; } .main-nav a { padding: .625rem; font-size: .8125rem; } .main-nav .icon { display: none; }
  .sidebar-bottom { display: flex; align-items: center; grid-column: 1/-1; padding: 0; gap: .75rem; margin: 0; }
  .theme-label { display: none; } .theme-select { width: auto; margin: 0; font-size: .8125rem; min-height: 2.5rem!important; }
  .account { margin-left: auto; border: 0; padding: 0; } .account>.avatar,.account div>span,.logout .icon { display: none; }
  .logout { padding: .5rem; min-height: 2.5rem; }
  .topbar { min-height: 3.25rem; padding: .75rem 1rem; } .content { padding: 1.5rem 1rem; }
  .page-heading { align-items: flex-start; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); } .stat { padding: 1rem; } .stat:first-child { padding-left: 1rem; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .attention { align-items: flex-start; flex-wrap: wrap; } .attention a { margin-left: 2rem; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.625rem; }
  .page-heading { flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
  .topbar-date { display: none; } .main-nav a { padding: .625rem .5rem; }
  .sidebar { gap: .75rem; } .sidebar-bottom { gap: .5rem; } .brand-mark { width: 2rem; height: 2rem; } .brand { gap: .375rem; font-size: 1.25rem; }
  .theme-select { max-width: 9.5rem; } .account strong { max-width: 7rem; font-size: .75rem; }
  .panel-heading,.filters { padding: 1rem; } .panel-heading { align-items: flex-start; }
  .search-field { min-width: 100%; } .filters select { flex: 1; } .filters .checkbox-label { order: 5; width: 100%; }
  .pagination { padding: 1rem; flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; } .span-two { grid-column: auto; }
  .create-form section { padding: 1.25rem; } .form-footer { padding: 1rem; flex-wrap: wrap; }
  .section-padding { padding: 1.25rem; } .login-card { padding: 1.75rem; } .summary { max-width: 18rem; }
}
@media (max-width: 360px) { .sidebar { grid-template-columns: 1fr; } .main-nav { justify-content: space-between; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition: none!important; animation: none!important; scroll-behavior: auto!important; } }
