:root { --ink:#17202a; --muted:#6c7885; --line:#e8edf1; --bg:#f5f7fa; --white:#fff; --brand:#2563eb; --brand-dark:#1d4ed8; --red:#dc2626; --amber:#d97706; --green:#16805b; --purple:#7c3aed; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--bg); font:14px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif; }
a { color:var(--brand); text-decoration:none; }
a:hover { color:var(--brand-dark); }
.topbar { height:64px; display:flex; align-items:center; padding:0 38px; background:#fff; border-bottom:1px solid var(--line); gap:32px; }
.brand { display:flex; align-items:center; gap:9px; color:var(--ink); font-weight:700; font-size:18px; white-space:nowrap; }
.brand-mark { display:inline-flex; width:30px; height:30px; border-radius:9px; align-items:center; justify-content:center; background:var(--brand); color:#fff; font-size:16px; }
.nav-links { display:flex; gap:24px; align-items:center; flex:1; }
.nav-links a { color:var(--muted); font-weight:600; }
.nav-links a:hover { color:var(--brand); }
.nav-create { color:var(--brand) !important; }
.user-menu { display:flex; gap:10px; align-items:center; color:#43505d; font-weight:600; }
.role-tag { border:1px solid #dbe5ff; color:var(--brand); background:#f2f6ff; border-radius:99px; padding:2px 9px; font-size:12px; }
.user-menu form { margin-left:8px; }
.link-button { border:0; background:transparent; color:var(--brand); padding:0; cursor:pointer; font:inherit; }
.link-button:hover { text-decoration:underline; }
.page-shell { max-width:1280px; margin:0 auto; padding:36px 28px 64px; }
.page-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:28px; }
.page-heading.compact { align-items:center; }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:30px; line-height:1.25; margin-bottom:6px; letter-spacing:-.5px; }
h2 { font-size:17px; margin-bottom:0; }
h3 { font-size:18px; }
.eyebrow { color:var(--brand); font-size:11px; letter-spacing:1.5px; font-weight:800; margin-bottom:5px; }
.muted { color:var(--muted); }
.primary-button,.secondary-button { display:inline-flex; align-items:center; justify-content:center; border-radius:8px; padding:9px 16px; font-weight:700; font-size:14px; cursor:pointer; border:1px solid transparent; line-height:1.4; }
.primary-button { background:var(--brand); color:#fff; box-shadow:0 2px 5px #2563eb25; }
.primary-button:hover { background:var(--brand-dark); color:#fff; }
.secondary-button { background:#fff; border-color:#d9e0e7; color:#43505d; }
.secondary-button:hover { border-color:#aab7c4; color:var(--ink); }
.full-width { width:100%; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat-card { background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px 20px; display:flex; flex-direction:column; gap:2px; }
.stat-card span { color:var(--muted); font-size:13px; font-weight:600; }
.stat-card strong { font-size:28px; line-height:1.2; }
.stat-card small { color:#9aa5b1; }
.urgent-card { border-color:#fed7aa; background:#fffaf3; }
.urgent-card strong { color:var(--red); }
.panel,.form-panel,.description-card { background:#fff; border:1px solid var(--line); border-radius:12px; }
.panel { overflow:hidden; }
.panel-title { padding:20px 22px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.panel-title span { color:var(--muted); font-size:13px; }
.filter-bar { padding:16px 20px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; border-bottom:1px solid var(--line); }
input,select,textarea { width:100%; border:1px solid #d9e0e7; border-radius:7px; padding:9px 11px; background:#fff; color:var(--ink); font:inherit; outline:0; line-height:1.45; }
input,select { min-height:42px; }
input:focus,select:focus,textarea:focus { border-color:#7ea5f6; box-shadow:0 0 0 3px #2563eb18; }
.filter-bar input { flex:1 1 280px; max-width:430px; }
.filter-bar select { flex:1 1 145px; width:auto; min-width:145px; }
.clear-link { align-self:center; margin-left:4px; }
.ticket-table { width:100%; border-collapse:collapse; }
.ticket-table th { text-align:left; color:#8a96a3; font-size:12px; font-weight:700; padding:12px 20px; background:#fbfcfd; white-space:nowrap; }
.ticket-table td { padding:15px 20px; border-top:1px solid #eef1f4; vertical-align:middle; }
.ticket-table tbody tr:hover { background:#fafcff; }
.ticket-title { display:block; color:var(--ink); font-weight:700; max-width:440px; }
.ticket-title:hover { color:var(--brand); }
.ticket-title small,.ticket-table td > small,.user-table td small { display:block; color:#9aa5b1; font-weight:400; margin-top:2px; }
.ticket-no { color:#8693a1; font-size:12px; font-weight:700; letter-spacing:.2px; margin-right:7px; }
.ticket-no.large { font-size:13px; margin:0 0 5px; }
.priority,.status,.account-status { display:inline-flex; align-items:center; white-space:nowrap; border-radius:99px; padding:3px 9px; font-size:12px; font-weight:700; }
.priority-low { color:#65727e; background:#f0f2f4; }.priority-normal { color:#2661a9; background:#eaf2ff; }.priority-high { color:#b45309; background:#fff3df; }.priority-urgent { color:#c21f1f; background:#ffe8e8; }
.status-new { color:#617181; background:#eef2f5; }.status-in_progress { color:#2458b7; background:#e9f0ff; }.status-pending { color:#a15e08; background:#fff5df; }.status-resolved { color:#14764f; background:#e6f7ee; }.status-closed { color:#68737d; background:#edf0f2; }
.large-badge { padding:6px 12px; font-size:14px; }
.empty-state { text-align:center; padding:78px 20px; color:var(--muted); }.empty-icon { width:48px; height:48px; border-radius:50%; background:#e6f7ee; color:var(--green); display:grid; place-items:center; margin:0 auto 14px; font-size:23px; font-weight:800; }.empty-state h3 { color:var(--ink); margin-bottom:6px; }.empty-state .primary-button { margin-top:14px; }.error-code { font-size:54px; color:var(--brand); font-weight:800; line-height:1; margin-bottom:14px; }
.form-panel { max-width:860px; padding:26px; }.stack-form { display:flex; flex-direction:column; gap:17px; }.stack-form label { color:#4a5662; font-weight:700; }.stack-form label > input,.stack-form label > select,.stack-form label > textarea { margin-top:6px; font-weight:400; }.required { color:var(--red); }.form-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:17px; }.form-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:4px; }
.breadcrumb { display:flex; gap:10px; color:#84909c; margin-bottom:22px; }.breadcrumb a { color:#637387; }.detail-layout { display:grid; grid-template-columns:minmax(0,1fr) 330px; gap:22px; }.detail-header { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:17px; }.detail-header h1 { margin-bottom:6px; }.description-card { padding:22px; white-space:pre-wrap; min-height:130px; margin-bottom:22px; }.comments-panel { overflow:visible; }.comment-list { padding:2px 22px; }.comment { display:flex; gap:12px; padding:19px 0; border-bottom:1px solid var(--line); }.comment:last-child { border-bottom:0; }.avatar { flex:none; width:32px; height:32px; border-radius:50%; background:#eaf2ff; color:var(--brand); display:grid; place-items:center; font-weight:800; }.comment-meta { display:flex; gap:12px; align-items:baseline; }.comment-meta span { color:#9aa5b1; font-size:12px; }.comment p { margin:6px 0 0; white-space:pre-wrap; }.comment-form { border-top:1px solid var(--line); padding:20px 22px; }.empty-inline { padding:20px 22px; margin-bottom:0; }.detail-side { display:flex; flex-direction:column; gap:18px; }.meta-list { padding:4px 22px 16px; margin:0; }.meta-list div { display:flex; justify-content:space-between; gap:12px; padding:13px 0; border-bottom:1px solid #f0f2f4; }.meta-list div:last-child { border-bottom:0; }.meta-list dt { color:#8995a1; }.meta-list dd { margin:0; text-align:right; font-weight:600; }.activity-list { padding:16px 22px 20px; }.activity { display:flex; gap:10px; padding:0 0 17px; position:relative; }.activity:last-child { padding-bottom:0; }.activity-dot { width:8px; height:8px; border-radius:50%; background:#9db7ef; margin-top:7px; flex:none; }.activity strong,.activity span,.activity small { display:block; }.activity span { color:#65727e; font-size:12px; }.activity small { color:#a1aab4; margin-top:3px; }.admin-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:22px; }.account-status.active { color:var(--green); background:#e6f7ee; }.account-status.inactive { color:#737d86; background:#eef0f2; }.user-table td:last-child { text-align:right; }
.auth-wrap { min-height:calc(100vh - 72px); display:grid; place-items:center; }.auth-card { width:min(400px,100%); background:#fff; border:1px solid var(--line); border-radius:14px; padding:36px; box-shadow:0 10px 35px #1620330c; }.auth-brand { justify-content:center; margin-bottom:8px; }.auth-card > .muted { text-align:center; margin-bottom:27px; }.login-hint { color:#9aa5b1; text-align:center; font-size:12px; margin:22px 0 0; }.flash-stack { position:fixed; top:76px; right:28px; z-index:5; display:flex; flex-direction:column; gap:8px; }.flash { border:1px solid; border-radius:8px; padding:10px 15px; background:#fff; box-shadow:0 4px 16px #16203318; }.flash.success { color:var(--green); border-color:#b9e5ce; }.flash.error { color:var(--red); border-color:#f2bcbc; }
@media (max-width:900px) { .topbar { padding:0 18px; gap:17px; }.nav-links { gap:12px; }.page-shell { padding:24px 16px 44px; }.stats-grid { grid-template-columns:repeat(2,1fr); }.detail-layout,.admin-grid { grid-template-columns:1fr; }.detail-side { order:-1; }.filter-bar { flex-wrap:wrap; }.filter-bar input,.filter-bar select { max-width:none; width:100%; }.ticket-table { min-width:760px; }.table-wrap { overflow-x:auto; }.form-panel { padding:20px; } }
@media (max-width:560px) { .topbar { height:auto; min-height:60px; flex-wrap:wrap; padding:13px 16px; }.nav-links { order:3; width:100%; }.user-menu { margin-left:auto; }.user-menu > span:first-child { display:none; }.page-heading { align-items:flex-start; flex-direction:column; }.form-grid { grid-template-columns:1fr; }.auth-card { padding:26px 20px; }.auth-wrap { min-height:calc(100vh - 40px); } }

/* Refined internal workspace skin */
body { background:radial-gradient(circle at 8% -10%, #eaf1ff 0, transparent 32%), linear-gradient(180deg, #f7f9fc 0%, #f1f4f8 100%); }
.topbar { position:sticky; top:0; z-index:10; box-shadow:0 5px 24px #1d35570d; }
.brand-mark { background:linear-gradient(135deg, #2563eb, #6941e8); box-shadow:0 5px 12px #2563eb35; }
.nav-links a { padding:8px 10px; border-radius:8px; }.nav-links a:hover { background:#f1f5ff; }.nav-create { background:#eff4ff; }
.page-heading { margin-bottom:30px; }.page-heading h1 { font-size:32px; }.panel,.form-panel,.description-card { box-shadow:0 8px 28px #23395d0b; }.stat-card { background:linear-gradient(145deg,#fff,#f9fbff); box-shadow:0 5px 18px #23395d08; }.stat-card strong { color:#1e293b; }
.filter-bar { background:#fcfdff; }.ticket-table tbody tr { transition:background .18s, transform .18s; }.ticket-table tbody tr:hover { box-shadow:inset 3px 0 0 var(--brand); transform:translateX(1px); }
.description-card { padding:24px; }.description-label { color:#64748b; font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; margin-bottom:9px; }.description-text { white-space:pre-wrap; }
.ticket-compose-card { width:min(100%,1120px); max-width:1120px; }.upload-zone { position:relative; display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:17px; border:1px dashed #b6c7e9; border-radius:12px; background:linear-gradient(135deg,#f7faff,#fbfcff); transition:.2s; }.upload-zone.is-dragging { border-color:var(--brand); background:#eef4ff; transform:translateY(-1px); }.upload-zone p { color:#8b98a8; font-size:12px; margin:3px 0 0; }.upload-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:10px; background:#e8efff; color:var(--brand); font-size:22px; font-weight:800; }.upload-zone input[type=file] { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }.upload-button { margin-left:auto; }.upload-preview { flex-basis:100%; display:flex; gap:10px; flex-wrap:wrap; }.upload-preview-item { display:flex; align-items:center; gap:8px; padding:6px 9px; border:1px solid #dbe5f5; border-radius:9px; background:#fff; color:#536274; font-size:12px; }.upload-preview-item img { width:36px; height:36px; object-fit:cover; border-radius:6px; }
.attachment-block { margin-top:22px; padding-top:18px; border-top:1px solid #edf1f6; }.attachment-heading { display:flex; align-items:center; gap:10px; margin-bottom:11px; }.attachment-heading span { color:#96a1af; font-size:12px; }.attachment-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:12px; }.attachment-thumb { display:flex; flex-direction:column; gap:5px; min-width:0; padding:0; border:0; background:transparent; text-align:left; cursor:zoom-in; color:#687588; font:inherit; }.attachment-thumb img { width:100%; aspect-ratio:1.35; object-fit:cover; border-radius:9px; border:1px solid #e1e7ef; background:#f5f7fa; transition:transform .18s, box-shadow .18s; }.attachment-thumb:hover img { transform:translateY(-2px); box-shadow:0 7px 16px #1f3b6821; }.attachment-thumb span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }.attachment-upload-form { border-top:1px solid var(--line); padding:12px 22px 18px; }.inline-upload { display:flex; align-items:center; gap:10px; color:#64748b; font-size:13px; font-weight:700; }.inline-upload input { flex:1; padding:6px; font-weight:400; }.image-modal { position:fixed; inset:0; z-index:30; display:none; align-items:center; justify-content:center; flex-direction:column; padding:44px; background:#071426d9; backdrop-filter:blur(6px); }.image-modal.is-open { display:flex; }.image-modal img { max-width:min(1100px,92vw); max-height:82vh; object-fit:contain; border-radius:10px; box-shadow:0 20px 60px #0008; }.image-modal-close { position:absolute; top:18px; right:26px; width:42px; height:42px; border:1px solid #ffffff45; border-radius:50%; background:#ffffff18; color:#fff; font-size:30px; line-height:1; cursor:pointer; }.image-modal-name { margin-top:14px; color:#e8eef7; font-size:13px; }.comment-form textarea { min-height:104px; }.detail-header { padding:22px; margin:-1px -1px 20px; border:1px solid var(--line); border-radius:12px; background:linear-gradient(135deg,#fff,#f9fbff); box-shadow:0 6px 20px #23395d08; }
@media (max-width:700px) { .upload-button { margin-left:0; }.inline-upload { flex-wrap:wrap; }.inline-upload input { flex-basis:100%; }.image-modal { padding:24px; }.image-modal-close { right:14px; top:12px; } }
.comment-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.comment-field { display:flex; min-width:0; flex-direction:column; gap:6px; color:#4a5662; font-size:13px; font-weight:800; }
.comment-field textarea { min-height:118px; resize:vertical; }
.comment-hint { margin:10px 0 0; }
@media (max-width:700px) { .comment-fields { grid-template-columns:1fr; } }
.admin-grid > .panel > .stack-form { padding:0 22px 22px; }
@media (max-width:700px) { .admin-grid > .panel > .stack-form { padding:0 16px 16px; } }
.urge-form { padding:0 22px 20px; }
@media (max-width:700px) { .urge-form { padding:0 16px 16px; } }
.account-summary-panel { margin-bottom:24px; }
.panel-subtitle { color:var(--muted); font-size:12px; margin:4px 0 0; font-weight:400; }
.account-summary-table .account-count,.user-table .account-count { color:#1e293b; font-size:16px; }
.assigned-card { border-color:#cfe0ff; background:linear-gradient(145deg,#fff,#f2f7ff); }
.assigned-card strong { color:var(--brand); }
.assigned-pending-card { border-color:#cfeee0; background:linear-gradient(145deg,#fff,#f3fbf7); }
.notice-panel { margin-bottom:24px; border-color:#f6d39b; background:#fffdf8; }
.urge-notice-panel .panel-title { background:linear-gradient(135deg,#fffaf0,#fff); }
.notice-count { display:inline-flex; min-width:22px; height:22px; align-items:center; justify-content:center; margin-left:6px; padding:0 6px; border-radius:99px; color:#9a5b00 !important; background:#ffedc7; font-size:12px !important; vertical-align:1px; }
.notice-label { color:#a15e08 !important; font-size:12px !important; font-weight:700; }
.reminder-list { padding:4px 22px 8px; }
.reminder-item { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 0; border-bottom:1px solid #f3eadb; color:var(--ink); }
.reminder-item:last-child { border-bottom:0; }
.reminder-item:hover { color:var(--brand); }
.reminder-main { display:flex; align-items:flex-start; min-width:0; gap:11px; }
.reminder-main > div { min-width:0; }
.reminder-main strong,.reminder-main span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reminder-main strong { max-width:680px; }
.reminder-main > div > span { margin-top:3px; color:#8a744f; font-size:12px; }
.reminder-dot { width:9px; height:9px; margin-top:7px; flex:none; border-radius:50%; background:#ef9b28; box-shadow:0 0 0 4px #fff0d6; }
.notice-banner { display:flex; align-items:flex-start; gap:12px; margin-bottom:18px; padding:14px 17px; border:1px solid #f4d19b; border-radius:12px; background:linear-gradient(135deg,#fffaf0,#fff); color:#8c570e; box-shadow:0 6px 18px #b9781c12; }
.notice-banner-icon { display:grid; width:25px; height:25px; flex:none; place-items:center; border-radius:50%; color:#fff; background:#e49a27; font-weight:800; }
.notice-banner strong,.notice-banner p { display:block; }
.notice-banner p { margin:3px 0 0; color:#9b7a4a; font-size:13px; }

/* UI resilience: keep long account names and ticket content readable at every width. */
.nav-links a { transition:background .18s, color .18s; }
.nav-links a.active { color:var(--brand); background:#eef4ff; }
.nav-create.active { background:#e4edff; }
.page-heading > div,
.detail-header > div,
.panel-title > div { min-width:0; }
.page-heading h1,
.detail-header h1,
.panel-title h2,
.ticket-title,
.comment p,
.description-text { overflow-wrap:anywhere; word-break:break-word; }
.table-wrap { width:100%; overflow-x:auto; overscroll-behavior-x:contain; }
.ticket-table { min-width:760px; }
.account-summary-table { min-width:680px; }
.user-table { min-width:820px; }
.ticket-table th,
.ticket-table td { white-space:nowrap; }
.ticket-table td:first-child { white-space:normal; min-width:220px; }
.ticket-title { white-space:normal; }
.ticket-table td small { white-space:normal; overflow-wrap:anywhere; }
.stack-form label { display:block; min-width:0; }
.stack-form label > input,
.stack-form label > select,
.stack-form label > textarea { display:block; min-width:0; }
.field-hint { display:block; color:#8a96a3; font-size:12px; line-height:1.45; font-weight:400; margin-top:6px; }
.paste-hint { display:block; color:#8a96a3; font-size:12px; line-height:1.45; font-weight:400; margin-top:7px; transition:color .2s; }
.paste-hint.is-active { color:var(--green); font-weight:700; }
.primary-button,
.secondary-button,
.link-button,
.nav-links a { white-space:nowrap; }
.filter-bar input,
.filter-bar select { min-width:0; }
.inline-upload input { min-width:0; }
.description-text { max-width:100%; }

@media (max-width:1100px) and (min-width:701px) {
  .topbar { padding:0 22px; gap:18px; }
  .nav-links { gap:4px; }
  .nav-links a { padding:7px 8px; }
  .user-menu { gap:6px; }
  .user-menu form { margin-left:2px; }
  .admin-grid { grid-template-columns:minmax(0,1fr) 300px; gap:16px; }
  .detail-layout { grid-template-columns:minmax(0,1fr); gap:16px; }
  .detail-side { order:-1; }
}

@media (max-width:700px) {
  .page-shell { width:100%; overflow-x:hidden; }
  .page-heading { gap:14px; }
  .page-heading h1 { font-size:26px; }
  .stats-grid { gap:10px; }
  .stat-card { padding:14px; }
  .stat-card strong { font-size:24px; }
  .panel-title { padding:16px; gap:12px; align-items:flex-start; }
  .filter-bar { padding:14px; }
  .filter-bar .secondary-button { width:100%; }
  .detail-header { padding:18px; flex-direction:column; gap:12px; }
  .detail-header h1 { font-size:25px; }
  .description-card { padding:18px; }
  .form-panel { width:100%; }
  .upload-zone { align-items:flex-start; }
  .upload-zone > div:nth-child(2) { flex:1; min-width:0; }
  .upload-button { width:100%; }
  .attachment-upload-form { padding-left:16px; padding-right:16px; }
  .comment-list { padding-left:16px; padding-right:16px; }
  .comment-form { padding-left:16px; padding-right:16px; }
  .reminder-list { padding-left:16px; padding-right:16px; }
  .reminder-item { align-items:flex-start; flex-direction:column; gap:8px; }
  .reminder-main strong { max-width:calc(100vw - 72px); }
  .reminder-item > .status { margin-left:20px; }
}

@media (min-width:1101px) {
  .stats-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
}

@media (max-width:560px) {
  .topbar { gap:10px; }
  .brand { font-size:16px; }
  .nav-links { gap:4px; overflow-x:auto; padding-bottom:2px; }
  .nav-links a { flex:0 0 auto; font-size:13px; }
  .user-menu { width:100%; justify-content:flex-end; }
  .page-shell { padding-left:12px; padding-right:12px; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stat-card small { font-size:11px; }
  .form-actions { flex-direction:column-reverse; }
  .form-actions > * { width:100%; }
  .meta-list { padding-left:16px; padding-right:16px; }
}
.assigned-pending-card strong { color:var(--green); }

/* Workspace shell: a quiet left rail keeps the data area focused on the work. */
@media (min-width:901px) {
  body.app-body { min-height:100vh; }
  .app-body .topbar { position:fixed; inset:0 auto 0 0; z-index:20; width:238px; height:100vh; padding:26px 16px 18px; display:flex; flex-direction:column; align-items:stretch; gap:0; border:0; border-right:1px solid #e4eaf2; box-shadow:8px 0 28px #1d355708; background:rgba(255,255,255,.94); }
  .app-body .brand-wrap { padding:0 10px 30px; }
  .app-body .brand { gap:11px; font-size:17px; }
  .app-body .brand > span:last-child { display:flex; flex-direction:column; line-height:1.2; }
  .app-body .brand > span:last-child small { color:#9aa6b3; font-size:10px; font-weight:600; letter-spacing:.06em; margin-top:4px; }
  .app-body .nav-section-label { color:#a1adba; font-size:10px; font-weight:800; letter-spacing:.13em; text-transform:uppercase; padding:0 12px 8px; }
  .app-body .nav-links { display:flex; flex-direction:column; align-items:stretch; flex:none; gap:5px; }
  .app-body .nav-links a { display:flex; align-items:center; gap:11px; min-height:43px; padding:10px 12px; border-radius:10px; color:#607083; font-size:14px; font-weight:700; }
  .app-body .nav-links a:hover { color:#2458b7; background:#f1f5ff; }
  .app-body .nav-links a.active { color:#2458b7; background:#eaf1ff; box-shadow:inset 3px 0 0 #2563eb; }
  .app-body .nav-icon { width:21px; color:#8290a0; font-size:18px; line-height:1; text-align:center; }
  .app-body .nav-links a.active .nav-icon,.app-body .nav-links a:hover .nav-icon { color:#2563eb; }
  .app-body .nav-create { margin-top:8px; color:#2458b7 !important; background:#f2f6ff !important; }
  .app-body .nav-create:hover,.app-body .nav-create.active { background:#e4edff !important; }
  .app-body .user-menu { margin-top:auto; display:grid; grid-template-columns:34px minmax(0,1fr); gap:9px; align-items:center; padding:12px 10px 4px; border-top:1px solid #edf1f5; color:#384758; }
  .app-body .user-avatar { display:grid; width:34px; height:34px; place-items:center; border-radius:11px; background:linear-gradient(135deg,#dbe8ff,#eae4ff); color:#3157a5; font-weight:800; }
  .app-body .user-copy { min-width:0; display:flex; flex-direction:column; line-height:1.3; }
  .app-body .user-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .app-body .user-copy span { color:#8c98a6; font-size:11px; margin-top:3px; }
  .app-body .user-menu form { grid-column:1 / -1; margin:4px 0 0; }
  .app-body .link-button { color:#8a96a3; font-size:12px; }
  .app-body .link-button:hover { color:#2563eb; text-decoration:none; }
  .app-body .page-shell { width:auto; max-width:none; margin-left:238px; padding:44px clamp(28px,4vw,72px) 72px; }
  .app-body .page-heading { max-width:1460px; }
  .app-body .stats-grid,.app-body .panel,.app-body .detail-layout,.app-body .admin-grid { max-width:1460px; }
}

/* Lists stay contained when an installation has hundreds of tickets. */
.ticket-list-scroll { max-height:min(600px, calc(100vh - 345px)); overflow:auto; overscroll-behavior:contain; }
.ticket-list-scroll .ticket-table thead th { position:sticky; top:0; z-index:2; box-shadow:0 1px 0 #e8edf1; }
.account-list-scroll { max-height:min(560px, calc(100vh - 250px)); overflow:auto; overscroll-behavior:contain; }
.account-list-scroll .ticket-table thead th { position:sticky; top:0; z-index:2; box-shadow:0 1px 0 #e8edf1; }
.nav-all-tickets { position:relative; }
.nav-all-tickets::after { content:""; width:5px; height:5px; margin-left:auto; border-radius:50%; background:#c2ccd8; }
.nav-all-tickets.active::after { background:var(--brand); }
.ticket-pagination { position:sticky; bottom:0; z-index:3; }

@media (max-width:900px) {
  .app-body .topbar { position:sticky; width:auto; height:auto; flex-direction:row; align-items:center; }
  .app-body .brand-wrap { padding:0; }
  .app-body .brand > span:last-child small,.app-body .nav-section-label { display:none; }
  .app-body .nav-links { flex-direction:row; flex:1; }
  .app-body .nav-links a { min-height:38px; }
  .app-body .nav-icon { display:none; }
  .app-body .user-menu { margin-top:0; display:flex; padding:0; border-top:0; }
  .app-body .user-copy { display:none; }
  .app-body .user-menu form { width:auto; margin:0; }
  .app-body .page-shell { margin-left:0; }
}

@media (max-width:560px) {
  .app-body .topbar { align-items:flex-start; }
  .app-body .nav-links { order:3; }
  .app-body .nav-links a { padding:7px 9px; }
  .app-body .user-menu { margin-left:auto; }
  .ticket-list-scroll { max-height:calc(100vh - 360px); }
  .ticket-pagination { position:static; }
}

/* Keep long ticket lists contained and easy to scan. */
.ticket-pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 20px; border-top:1px solid var(--line); background:#fcfdff; }
.pagination-summary { color:#7c8794; font-size:12px; }
.pagination-nav { display:flex; align-items:center; gap:6px; }
.pagination-button { display:inline-flex; min-width:34px; height:32px; align-items:center; justify-content:center; padding:0 10px; border:1px solid #d9e0e7; border-radius:7px; background:#fff; color:#536274; font-size:13px; font-weight:700; }
.pagination-button:hover { border-color:#9db7ef; color:var(--brand); background:#f5f8ff; }
.pagination-button.is-current { border-color:var(--brand); background:var(--brand); color:#fff; }
.pagination-button.is-disabled { color:#b4bdc7; background:#f5f7f9; cursor:not-allowed; }
.pagination-ellipsis { min-width:20px; text-align:center; color:#98a3ae; }
@media (max-width:560px) { .ticket-pagination { align-items:flex-start; flex-direction:column; padding:13px 14px; }.pagination-nav { max-width:100%; overflow-x:auto; padding-bottom:2px; } }

/* Next pass: clear work queues and compact mobile layouts. */
.overdue-card { border-color:#ffd2d2; background:linear-gradient(145deg,#fff,#fff6f6); }
.overdue-card strong { color:#c62828; }
.due-today-card { border-color:#f5dfad; background:linear-gradient(145deg,#fff,#fffaf0); }
.due-today-card strong { color:#b7791f; }
.nav-badge { display:inline-flex; min-width:18px; height:18px; align-items:center; justify-content:center; margin-left:5px; padding:0 5px; border-radius:99px; color:#fff; background:#e58d22; font-size:10px; line-height:1; }
.quick-view-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 24px; padding:10px 12px; border:1px solid #e3eaf4; border-radius:12px; background:#ffffffb8; }
.quick-view-label { margin-right:3px; color:#738195; font-size:12px; font-weight:800; }
.quick-view-link { padding:6px 11px; border-radius:8px; color:#5d6d80; font-size:12px; font-weight:700; }
.quick-view-link:hover,.quick-view-link.active { color:#2458b7; background:#eaf1ff; }
.overdue-badge { display:inline-flex; margin-left:6px; padding:2px 6px; border-radius:99px; color:#b42318; background:#ffe7e5; font-size:11px; font-weight:700; white-space:nowrap; }
.notification-list { padding:4px 22px 10px; }
.notification-item { display:flex; align-items:flex-start; gap:11px; padding:14px 0; border-bottom:1px solid #edf1f5; color:var(--ink); }
.notification-item:last-child { border-bottom:0; }.notification-item:hover { color:var(--brand); }
.notification-icon { display:grid; width:25px; height:25px; flex:none; place-items:center; border-radius:8px; color:#fff; background:#93a5bd; font-weight:800; }
.notification-item.is-unread .notification-icon { background:#e49a27; }
.notification-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }.notification-copy strong { overflow-wrap:anywhere; }.notification-copy small { color:#8a96a3; font-size:12px; }
.notification-preview-panel { margin-bottom:24px; border-color:#d9e4f7; }.notification-preview-list { padding-top:0; }
.confirm-panel { border-color:#cfe0ff; background:#fbfdff; }.confirm-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0 22px 22px; }
.pending-transfer-list { padding:6px 22px 0; }.pending-transfer-list a { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid #edf1f5; color:var(--ink); }.pending-transfer-list span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#718096; }
.transfer-form,.account-edit-form { padding:20px 22px 22px; }.compact-empty { padding:34px 20px; }
.account-card-list { display:flex; flex-direction:column; }.account-card { padding:18px 22px; border-top:1px solid #edf1f5; }.account-card-head,.account-identity,.account-card-actions { display:flex; align-items:center; }.account-card-head { justify-content:space-between; gap:12px; }.account-identity { min-width:0; gap:11px; }.account-identity > div { display:flex; min-width:0; flex-direction:column; }.account-identity strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.account-identity small { margin-top:2px; color:#8a96a3; }.account-avatar { display:grid; width:34px; height:34px; flex:none; place-items:center; border-radius:11px; color:#3157a5; background:linear-gradient(135deg,#dbe8ff,#eae4ff); font-weight:800; }.account-card-meta { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0 14px 45px; }.account-card-meta span { display:flex; flex-direction:column; gap:2px; }.account-card-meta small { color:#8a96a3; font-size:11px; }.account-card-meta strong { font-size:14px; }.account-card-actions { gap:14px; margin-left:45px; }.account-card-actions .secondary-button { padding:6px 11px; font-size:12px; }

@media (max-width:900px) {
  .admin-grid { grid-template-columns:1fr; }
  .detail-layout > section { order:1; }
  .detail-layout > .detail-side { order:2; }
}

@media (max-width:700px) {
  .ticket-table:not(.user-table) { min-width:0; display:block; }
  .ticket-table:not(.user-table) thead { display:none; }
  .ticket-table:not(.user-table) tbody,.ticket-table:not(.user-table) tr { display:block; }
  .ticket-table:not(.user-table) tr { padding:13px 16px; border-top:1px solid #eef1f4; }
  .ticket-table:not(.user-table) td { display:flex; justify-content:space-between; gap:12px; padding:4px 0; border:0; white-space:normal; text-align:right; }
  .ticket-table:not(.user-table) td:first-child { display:block; min-width:0; padding-bottom:8px; text-align:left; }
  .ticket-table:not(.user-table) td:nth-child(2)::before { content:'紧急程度'; color:#8a96a3; font-size:12px; }
  .ticket-table:not(.user-table) td:nth-child(3)::before { content:'状态'; color:#8a96a3; font-size:12px; }
  .ticket-table:not(.user-table) td:nth-child(4)::before { content:'负责人'; color:#8a96a3; font-size:12px; }
  .ticket-table:not(.user-table) td:nth-child(5)::before { content:'发起人'; color:#8a96a3; font-size:12px; }
  .ticket-table:not(.user-table) td:nth-child(6)::before { content:'更新时间'; color:#8a96a3; font-size:12px; }
  .user-table { min-width:0; display:block; }.user-table thead { display:none; }.user-table tbody,.user-table tr { display:block; }.user-table tr { padding:14px 16px; border-top:1px solid #eef1f4; }.user-table td { display:flex; justify-content:space-between; gap:12px; padding:4px 0; border:0; text-align:right; white-space:normal; }.user-table td:first-child { display:block; text-align:left; padding-bottom:8px; }.user-table td:nth-child(2)::before { content:'部门'; color:#8a96a3; }.user-table td:nth-child(3)::before { content:'角色'; color:#8a96a3; }.user-table td:nth-child(4)::before { content:'指派总数'; color:#8a96a3; }.user-table td:nth-child(5)::before { content:'待处理'; color:#8a96a3; }.user-table td:nth-child(6)::before { content:'状态'; color:#8a96a3; }.user-table td:last-child { justify-content:flex-end; padding-top:8px; }.user-actions { gap:14px; }
  .account-list-scroll,.ticket-list-scroll { max-height:none; overflow:visible; }.quick-view-bar { align-items:flex-start; }.quick-view-label { flex-basis:100%; }.notification-list { padding-left:16px; padding-right:16px; }.notification-preview-panel .panel-title { align-items:center; }.notification-preview-panel .panel-title .secondary-button { flex:none; padding:7px 9px; font-size:12px; }.confirm-actions { grid-template-columns:1fr; padding-left:16px; padding-right:16px; }.transfer-form,.account-edit-form { padding-left:16px; padding-right:16px; }
}

@media (max-width:700px) { .account-card { padding:16px; }.account-card-meta { grid-template-columns:repeat(2,minmax(0,1fr)); margin-left:0; }.account-card-actions { margin-left:0; } }

/* Status workflow makes the resolution step visible on the ticket detail page. */
.status-flow { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; margin:0 22px 20px; padding:14px 0 4px; border-bottom:1px solid #edf1f6; }
.status-flow-step { position:relative; display:flex; min-width:0; flex-direction:column; gap:3px; padding:0 5px 12px; color:#a0aab5; text-align:center; }
.status-flow-step::after { content:""; position:absolute; top:7px; left:calc(50% + 12px); width:calc(100% - 24px); height:2px; background:#e7ebf0; }
.status-flow-step:last-child::after { display:none; }
.status-flow-dot { position:relative; z-index:1; width:14px; height:14px; margin:0 auto 5px; border:3px solid #dce2e9; border-radius:50%; background:#fff; }
.status-flow-step strong { font-size:12px; }
.status-flow-step small { color:inherit; font-size:10px; white-space:nowrap; }
.status-flow-step.is-done { color:#4c9b78; }.status-flow-step.is-done .status-flow-dot { border-color:#78c39f; background:#78c39f; }.status-flow-step.is-done::after { background:#9ed6ba; }
.status-flow-step.is-current { color:var(--brand); }.status-flow-step.is-current .status-flow-dot { border-color:var(--brand); background:#eef4ff; box-shadow:0 0 0 4px #e6eeff; }
.workflow-panel > .stack-form { padding:0 22px 22px; }
@media (max-width:700px) { .status-flow { margin-left:16px; margin-right:16px; overflow-x:auto; grid-template-columns:repeat(5,100px); justify-content:start; padding-bottom:10px; }.status-flow-step::after { left:62px; width:76px; } }
@media (max-width:700px) { .workflow-panel > .stack-form { padding:0 16px 16px; } }
