
:root{--bg:#f4f7fb;--card:#fff;--text:#172033;--muted:#748096;--line:#e7ebf2;--accent:#5b5ce2}
*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}
.layout{display:flex;min-height:100vh}.sidebar{width:235px;background:#101522;color:#dce2ef;padding:22px 14px;position:fixed;top:0;bottom:0}.logo{font-size:21px;font-weight:800;padding:8px 12px 24px}.logo span{color:#8c8df5}.nav a{display:block;padding:11px 13px;border-radius:10px;margin:4px 0;color:#aeb8ca}.nav a:hover{background:#1c2435;color:#fff}
.main{margin-left:235px;width:calc(100% - 235px);padding:28px}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.title h1{margin:0;font-size:26px}.muted{color:var(--muted);font-size:13px}.pill{padding:7px 11px;background:#fff;border:1px solid var(--line);border-radius:999px;font-size:12px}
.cards{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}.card,.form-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px;box-shadow:0 4px 16px #18243a08}.label{color:var(--muted);font-size:13px}.value{font-size:25px;font-weight:800;margin-top:7px}
.section{margin-top:20px}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.table-wrap{background:#fff;border:1px solid var(--line);border-radius:15px;overflow:auto}.table{width:100%;border-collapse:collapse;min-width:760px}.table th,.table td{padding:13px 15px;border-bottom:1px solid var(--line);text-align:left;font-size:13px}.table th{color:var(--muted);background:#fafbfe}
.btn{border:0;border-radius:9px;padding:10px 14px;background:var(--accent);color:#fff;font-weight:700;cursor:pointer}.btn.secondary{background:#eef0ff;color:#4e50c9}.btn.danger{background:#fff0f1;color:#c93645}.btn.small{padding:7px 9px;font-size:12px}
.input,.select{width:100%;padding:10px 11px;border:1px solid #dfe4ec;border-radius:9px;background:#fff}.modal-form{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.full{grid-column:1/-1}.badge{display:inline-block;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:700}.Paid{background:#e7f8f0;color:#14875d}.Pending{background:#fff6dd;color:#9b7000}.Refunded,.Cancelled{background:#ffecee;color:#c73c49}
.flash{padding:11px 14px;border-radius:10px;background:#e9f8f0;color:#157650;margin-bottom:12px}.flash.error{background:#fff0f1;color:#bd3342}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#111727,#292c5d)}.login-box{width:min(420px,92vw);background:#fff;border-radius:20px;padding:30px}.login-box .field{margin:15px 0}.login-box .btn{width:100%}
@media(max-width:1000px){.cards{grid-template-columns:repeat(2,1fr)}.sidebar{width:70px}.logo{font-size:0}.logo span{font-size:20px}.nav a{font-size:0;text-align:center}.main{margin-left:70px;width:calc(100% - 70px)}}@media(max-width:650px){.main{padding:16px}.modal-form{grid-template-columns:1fr}.full{grid-column:auto}}

.vip-badge{display:inline-block;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:800;background:#f4c95d;color:#4a3500;white-space:nowrap}
.vip-normal{color:#7b8495;font-weight:600}
.vip-1{background:#e8eef7;color:#345}
.vip-2{background:#d9f2ff;color:#075985}
.vip-3{background:#dff7e8;color:#166534}
.vip-4{background:#eee1ff;color:#6b21a8}
.vip-5{background:#ffe4d6;color:#9a3412}
.vip-6{background:#ffe1ec;color:#9d174d}
.vip-7{background:#e0e7ff;color:#3730a3}
.vip-8{background:#fef3c7;color:#92400e}
.period-tabs{display:flex;gap:8px;align-items:center;margin-bottom:16px;flex-wrap:wrap}.period-tabs .active{background:var(--accent);color:#fff}.modal-form label{font-size:13px;color:var(--muted);display:grid;gap:5px}
.top-controls{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;justify-content:flex-end}.quick-control{display:flex;align-items:center;gap:5px}.quick-control label{font-size:11px;color:var(--muted)}.quick-control .select{width:auto;min-width:78px;padding:7px 9px;font-size:12px}.top-controls .pill{white-space:nowrap}@media(max-width:900px){.top{align-items:flex-start;gap:14px;flex-direction:column}.top-controls{justify-content:flex-start}}
.nav-unread{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#ef4444;color:#fff;font-size:10px;margin-left:5px}.chat-shell{display:grid;grid-template-columns:310px minmax(0,1fr);height:calc(100vh - 150px);min-height:560px;background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 4px 16px #18243a08}.chat-list{border-right:1px solid var(--line);background:#fbfcff;overflow:auto}.chat-list-head{padding:16px;border-bottom:1px solid var(--line);display:grid;gap:10px}.chat-create-actions{display:flex;gap:7px}.chat-room-item{width:100%;border:0;border-bottom:1px solid var(--line);background:transparent;padding:12px 13px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer}.chat-room-item:hover,.chat-room-item.active{background:#eef0ff}.chat-avatar{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#fff;border:1px solid var(--line);flex:none}.chat-room-copy{min-width:0;display:grid;gap:4px;flex:1}.chat-room-copy strong,.chat-room-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-room-copy small{color:var(--muted);font-size:12px}.chat-unread{background:#ef4444;color:#fff;border-radius:999px;min-width:20px;height:20px;display:grid;place-items:center;font-size:11px;font-weight:800}.chat-empty-list{padding:20px;color:var(--muted);font-size:13px}.chat-main{min-width:0;display:grid;grid-template-rows:auto 1fr auto;background:#f8faff}.chat-header{padding:15px 18px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.chat-header span{color:var(--muted);font-size:12px}.chat-messages{padding:18px;overflow:auto;display:flex;flex-direction:column;gap:12px}.chat-message{max-width:min(760px,90%)}.chat-message-meta{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:11px;margin-bottom:4px}.chat-bubble{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;line-height:1.5;box-shadow:0 2px 8px #18243a06;word-break:break-word}.chat-welcome{text-align:center;color:var(--muted);margin:auto;line-height:1.8}.chat-composer{display:grid;grid-template-columns:1fr auto;gap:9px;padding:12px;border-top:1px solid var(--line);background:#fff}.chat-modal{position:fixed;inset:0;background:#0b102099;display:grid;place-items:center;padding:20px;z-index:20}.chat-modal[hidden]{display:none}.chat-modal-card{width:min(520px,96vw);max-height:85vh;overflow:auto;background:#fff;border-radius:18px;padding:20px}.chat-user-picker{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.chat-user-option{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid var(--line);border-radius:10px;cursor:pointer}.chat-user-option span{display:grid;gap:3px}.chat-user-option small{color:var(--muted)}
@media(max-width:800px){.chat-shell{grid-template-columns:1fr;height:auto;min-height:70vh}.chat-list{max-height:300px;border-right:0;border-bottom:1px solid var(--line)}.chat-user-picker{grid-template-columns:1fr}.chat-main{min-height:520px}}

/* Account role grouping */
.account-categories{display:flex;flex-direction:column;gap:18px}.account-category{background:#fff;border:1px solid #e7eaf2;border-radius:16px;overflow:hidden;box-shadow:0 4px 18px rgba(31,41,55,.04)}.account-category-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:linear-gradient(90deg,#f8f9ff,#fff);border-bottom:1px solid #e7eaf2}.account-category-header>div{display:flex;align-items:center;gap:10px;font-size:16px}.category-icon{font-size:20px}.category-count{min-width:30px;height:26px;padding:0 9px;border-radius:999px;background:#eef0ff;color:#4f46e5;font-weight:700;text-align:center;line-height:26px}.account-table tr.account-disabled td{opacity:.68;background:#fafafa}.account-actions{white-space:normal;vertical-align:middle}.staff-category{margin-bottom:18px}.staff-category .table-wrap{margin:0}.account-category .table-wrap{border:0;border-radius:0}.account-category .table{margin:0}

/* Orders page polish */
.order-page{display:flex;flex-direction:column;gap:18px}.order-hero{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:20px 22px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(135deg,#ffffff,#f7f8ff);box-shadow:0 4px 16px #18243a08}.order-hero h2{margin:3px 0 4px;font-size:22px}.eyebrow{font-size:11px;letter-spacing:1.5px;font-weight:800;color:#5b5bd6}.order-summary{min-width:120px;text-align:center;padding:12px 16px;border:1px solid #e1e3ff;border-radius:13px;background:#f5f6ff}.summary-label{display:block;color:var(--muted);font-size:11px}.order-summary strong{font-size:25px;color:#4f46e5}.order-create-card{padding:20px}.order-create-card .section-head{margin-bottom:16px}.order-create-card h3,.history-head h3{margin:0 0 4px}.auto-ticket{font-size:12px;font-weight:700;padding:8px 11px;border-radius:999px;background:#eef0ff;color:#4f46e5;white-space:nowrap}.order-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.order-field{display:grid;gap:6px}.order-field label,.status-filter label{font-size:12px;color:var(--muted);font-weight:700}.wide-field{grid-column:span 2}.ticket-field{min-width:0}.ticket-input{font-weight:800;color:#4f46e5;background:#f8f8ff}.inline-fields{display:grid;grid-template-columns:88px 1fr;gap:7px}.calculated-input{background:#f8fafc;font-weight:700}.vip-note{min-height:20px;font-size:12px;color:#4f46e5;font-weight:700}.order-submit{display:flex;align-items:end;justify-content:flex-end}.order-submit .btn{width:100%;height:42px}.history-head{align-items:flex-end}.history-head>div:first-child{display:flex;flex-direction:column}.status-filter{display:flex;align-items:end;gap:8px}.status-filter .select{width:auto;min-width:145px}.order-table-wrap{border-radius:16px}.order-table{min-width:1180px}.order-table th{padding:11px 12px;font-size:11px;letter-spacing:.2px}.order-table td{padding:12px}.ticket-pill{display:inline-flex;padding:5px 8px;border-radius:8px;background:#eef0ff;color:#4f46e5;font-weight:800;font-size:12px}.cell-main{font-weight:700}.cell-sub{font-size:11px;color:var(--muted);margin-top:3px}.money-main{font-weight:700}.payment-edit-form,.status-select{margin:0}.payment-select{min-width:118px;width:auto;padding:7px 28px 7px 9px;font-size:12px}.status-select{min-width:100px;width:auto;padding:7px 24px 7px 9px;font-size:12px}.date-cell{white-space:nowrap;font-size:12px}.empty-row{text-align:center!important;padding:40px!important;color:var(--muted)}
@media(max-width:1100px){.order-form{grid-template-columns:repeat(2,minmax(0,1fr))}.wide-field{grid-column:span 2}}
@media(max-width:650px){.order-hero{align-items:flex-start;flex-direction:column}.order-summary{width:100%;box-sizing:border-box}.order-form{grid-template-columns:1fr}.wide-field{grid-column:auto}.order-create-card{padding:16px}.history-head{align-items:stretch}.status-filter{align-items:stretch}.status-filter .select{width:100%}.status-filter{flex-direction:column}}

/* Chat interaction polish */
.chat-header-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.chat-header>div:first-child{min-width:0;display:grid;gap:3px}.chat-message{position:relative}.chat-message.mine{align-self:flex-end}.chat-message.mine .chat-message-meta{justify-content:flex-end}.chat-message.mine .chat-bubble{background:#eef0ff;border-color:#dfe2ff}.chat-message-actions{display:flex;gap:5px;justify-content:flex-end;margin-top:5px;opacity:.82}.chat-action{border:0;background:transparent;color:#5b5bd6;font-size:11px;font-weight:700;cursor:pointer;padding:2px 4px}.chat-action:hover{text-decoration:underline}.chat-action.danger{color:#c93645}.chat-bubble.recalled{color:var(--muted);font-style:italic;background:#f3f4f6}.chat-message-meta em{font-style:normal;color:var(--muted)}

/* Chat interaction polish */
.chat-header-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.chat-header>div:first-child{min-width:0;display:grid;gap:3px}.chat-message{position:relative}.chat-message.mine{align-self:flex-end}.chat-message.mine .chat-message-meta{justify-content:flex-end}.chat-message.mine .chat-bubble{background:#eef0ff;border-color:#dfe2ff}.chat-message-actions{display:flex;gap:5px;justify-content:flex-end;margin-top:5px;opacity:.82}.chat-action{border:0;background:transparent;color:#5b5bd6;font-size:11px;font-weight:700;cursor:pointer;padding:2px 4px}.chat-action:hover{text-decoration:underline}.chat-action.danger{color:#c93645}.chat-bubble.recalled{color:var(--muted);font-style:italic;background:#f3f4f6}.chat-message-meta em{font-style:normal;color:var(--muted)}

/* Chat v15 controls */
.chat-blocked-note{display:inline-flex;align-items:center;padding:7px 10px;border-radius:9px;background:#f3f4f6;color:#8b93a7;font-size:12px;font-weight:700}.chat-members-list{display:grid;gap:8px}.chat-member-row{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fbfcff}.chat-member-row>span:last-child{display:grid;gap:3px}.chat-member-row small{color:var(--muted);font-size:11px}.chat-avatar.small{width:30px;height:30px;border-radius:9px;font-size:14px}.chat-room-member-count{color:var(--muted);font-size:10px;margin-left:4px}.chat-add-empty{padding:10px;color:var(--muted);font-size:12px}

.customer-portal-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.customer-portal-head h2{margin:0 0 4px}.customer-order-table{min-width:1100px}.row-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.order-badges{display:flex;gap:8px;flex-wrap:wrap}.order-badges a{text-decoration:none}.order-request-card{max-width:760px}.order-request-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.order-request-form .full{grid-column:1/-1}.order-request-form textarea{resize:vertical}.actions{display:flex;gap:8px;flex-wrap:wrap}.filters{display:flex;align-items:center}.approval-form{display:grid;grid-template-columns:120px 150px auto auto;gap:6px;align-items:center;min-width:390px}.approval-form .input:last-child{grid-column:1/-1}.approval-amount,.approval-staff{min-width:0}.badge{white-space:nowrap}
@media(max-width:700px){.customer-portal-head{align-items:stretch;flex-direction:column}.order-request-form{grid-template-columns:1fr}.order-request-form .full{grid-column:auto}.approval-form{grid-template-columns:1fr 1fr;min-width:260px}.approval-form .input:last-child{grid-column:1/-1}.filters{width:100%}.history-head{align-items:stretch!important;flex-direction:column}.status-filter{flex-wrap:wrap}.status-filter .select{min-width:120px!important}.order-badges{width:100%}}

/* Mobile responsive fix v8
   Keeps the desktop sidebar, but turns it into an icon rail on phones.
   Prevents the fixed sidebar + main content from exceeding the viewport.
*/
@media (max-width: 700px) {
  html, body { width:100%; max-width:100%; overflow-x:hidden; }
  .layout { width:100%; min-width:0; overflow-x:hidden; }

  .sidebar {
    width:64px !important;
    min-width:64px !important;
    box-sizing:border-box !important;
    padding:14px 6px !important;
    overflow:hidden !important;
  }

  .logo {
    width:100% !important;
    box-sizing:border-box !important;
    padding:8px 0 18px !important;
    text-align:center !important;
    font-size:0 !important;
    line-height:1.1 !important;
  }
  .logo span { font-size:0 !important; }
  .logo::after {
    content:"九天";
    display:block;
    font-size:17px;
    font-weight:800;
    line-height:1.15;
    color:#8c8df5;
  }

  .nav { width:100%; }
  .nav a {
    width:100% !important;
    box-sizing:border-box !important;
    height:44px !important;
    padding:10px 0 !important;
    margin:3px 0 !important;
    text-align:center !important;
    font-size:0 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
  }
  .nav a:nth-child(1)::before { content:"📊"; }
  .nav a:nth-child(2)::before { content:"👤"; }
  .nav a:nth-child(3)::before { content:"📦"; }
  .nav a:nth-child(4)::before { content:"🎧"; }
  .nav a:nth-child(5)::before { content:"🏆"; }
  .nav a:nth-child(6)::before { content:"💬"; }
  .nav a:nth-child(7)::before { content:"💎"; }
  .nav a:nth-child(8)::before { content:"🔐"; }
  .nav a:nth-child(9)::before { content:"👥"; }
  .nav a:nth-child(10)::before { content:"📋"; }
  .nav a:nth-child(11)::before { content:"↪"; }
  .nav a::before {
    display:inline-block;
    font-size:19px !important;
    line-height:24px;
  }
  .nav a:hover { background:#1c2435; }

  .main {
    margin-left:64px !important;
    width:calc(100% - 64px) !important;
    max-width:calc(100% - 64px) !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    padding:16px 12px !important;
    overflow-x:hidden !important;
  }

  .top, .customer-portal-head {
    width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .top { align-items:flex-start; flex-direction:column; gap:10px; }
  .title h1 { font-size:24px; }
  .muted { line-height:1.5; }

  .cards { grid-template-columns:1fr !important; }
  .table-wrap {
    max-width:100%;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch;
  }
  .table { min-width:700px; }

  .order-hero,
  .order-request-card,
  .form-card,
  .section,
  .card {
    max-width:100% !important;
    box-sizing:border-box;
  }

  .order-form,
  .order-request-form {
    grid-template-columns:1fr !important;
  }
  .order-request-form .full,
  .wide-field { grid-column:auto !important; }

  input, select, textarea, button {
    max-width:100%;
    box-sizing:border-box;
  }

  .pill, .filters, .status-filter {
    max-width:100%;
  }
}

/* Contact / Discord card */
.contact-card{margin-top:22px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 4px 16px #18243a08}
.contact-title{font-weight:800;margin-bottom:9px}
.contact-items{display:flex;gap:9px;flex-wrap:wrap;align-items:center}
.contact-items a,.contact-items span{display:inline-flex;align-items:center;padding:8px 11px;border-radius:9px;background:#f7f8ff;color:#4f50c9;font-size:12px;font-weight:700}
.contact-items a:hover{background:#eef0ff}
@media(max-width:700px){.contact-card{margin-top:16px;padding:14px}.contact-items{display:grid;grid-template-columns:1fr}.contact-items a,.contact-items span{width:100%;box-sizing:border-box}}
/* Internal outsourcing / club commission */
.outsourcing-note{font-size:12px;color:var(--muted)}

/* Staff earnings / monthly rate ranking */
.staff-page{display:flex;flex-direction:column;gap:18px}.staff-hero{display:flex;justify-content:space-between;align-items:center;gap:22px;padding:24px 26px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,#fff 0%,#f7f7ff 100%);box-shadow:0 6px 24px #18243a0a}.staff-hero h2{margin:4px 0 6px;font-size:24px}.staff-hero p{margin:0}.eyebrow{font-size:11px;letter-spacing:1.5px;font-weight:800;color:#5b5bd6}.month-picker{min-width:250px}.month-picker>label{display:block;font-size:11px;color:var(--muted);font-weight:700;margin-bottom:6px}.month-picker-row{display:flex;gap:7px}.month-picker-row .input{min-width:145px}.earnings-stats{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:14px}.earning-card{min-height:120px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 5px 18px #18243a08;display:flex;align-items:center;gap:13px}.earning-card.primary{background:linear-gradient(135deg,#f5f5ff,#fff);border-color:#dddfff}.earning-card.highlight{border-color:#d9ddff;background:#fafaff}.earning-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:#eeeefe;font-size:22px}.stat-label{color:var(--muted);font-size:12px;font-weight:700}.earning-big{font-size:28px;font-weight:900;color:#4f46e5;margin:4px 0}.earning-number{font-size:26px;font-weight:900;margin:7px 0 3px}.staff-panel{margin-top:0;background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px;box-shadow:0 5px 18px #18243a08}.staff-panel .section-head{margin-bottom:14px}.staff-panel h3{margin:0 0 4px}.rate-chip{display:inline-flex;padding:8px 12px;border-radius:999px;background:#eef0ff;color:#4f46e5;font-weight:800;font-size:12px}.money-positive{color:#16845b}.staff-earnings-table,.staff-rank-table{min-width:850px}.staff-earnings-table th,.staff-rank-table th{font-size:11px;text-transform:none}.rank-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.rank-summary>div{background:#fff;border:1px solid var(--line);border-radius:15px;padding:15px 17px;display:flex;flex-direction:column;gap:5px}.rank-summary strong{font-size:22px}.rank-row.account-current{background:#f7f7ff}.rank-medal{display:inline-flex;min-width:30px;justify-content:center;font-size:18px}.role-chip{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800}.role-chip.admin{background:#eee9ff;color:#6941c6}.role-chip.staff{background:#e9f6ff;color:#12658f}.rate-value{color:#4f46e5;font-size:15px}.badge{margin-left:7px}
@media(max-width:900px){.staff-hero{align-items:flex-start;flex-direction:column}.month-picker{width:100%;min-width:0}.earnings-stats{grid-template-columns:repeat(2,1fr)}.rank-summary{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.earnings-stats,.rank-summary{grid-template-columns:1fr}.earning-card{min-height:100px}.staff-panel{padding:14px}.month-picker-row{width:100%}.month-picker-row .input{flex:1;min-width:0}.staff-hero{padding:18px}.staff-hero h2{font-size:21px}}

/* Sidebar navigation polish v12
   - Desktop: fixed sidebar with independently scrollable navigation
   - Tablet / phone: compact icon rail with correctly mapped icons
*/
.sidebar{
  height:100vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:18px 12px;
}
.logo{flex:none;padding:8px 12px 18px;line-height:1.15}
.nav{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:2px 2px 8px;
  scrollbar-width:thin;
  scrollbar-color:#343d52 transparent;
}
.nav::-webkit-scrollbar{width:6px}
.nav::-webkit-scrollbar-track{background:transparent}
.nav::-webkit-scrollbar-thumb{background:#343d52;border-radius:99px}
.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:10px 11px;
  margin:3px 0;
  border-radius:11px;
  color:#aeb8ca;
  white-space:nowrap;
  transition:background .15s ease,color .15s ease,transform .15s ease;
}
.nav a:hover{background:#1c2435;color:#fff;transform:translateX(1px)}
.nav-icon{
  width:24px;
  min-width:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  line-height:1;
}
.nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
.nav .nav-logout{margin-top:8px}
.nav-unread{margin-left:auto;flex:none}

@media(max-width:1100px){
  .sidebar{width:76px;padding:16px 7px}
  .logo{padding:8px 0 18px;text-align:center;font-size:0}
  .logo::after{content:"九天";display:block;font-size:17px;font-weight:800;line-height:1.15;color:#8c8df5}
  .logo span{display:none}
  .nav{padding-left:0;padding-right:0}
  .nav a{width:100%;height:46px;min-height:46px;padding:10px 0;margin:3px 0;justify-content:center;gap:0}
  .nav-label{display:none}
  .nav-icon{width:100%;min-width:0;font-size:20px}
  .nav-unread{position:absolute;margin:0;transform:translate(17px,-12px);min-width:16px;height:16px;padding:0 4px;font-size:9px}
  .nav a{position:relative}
  .main{margin-left:76px;width:calc(100% - 76px)}
}

@media(max-width:700px){
  .sidebar{width:64px;padding:12px 5px}
  .logo{padding:7px 0 14px}
  .logo::after{font-size:16px}
  .nav a{height:43px;min-height:43px;border-radius:10px;margin:2px 0}
  .nav-icon{font-size:19px}
  .nav-unread{transform:translate(15px,-11px)}
  .main{margin-left:64px;width:calc(100% - 64px);max-width:calc(100% - 64px)}
}
@media(max-width:1100px){.nav a::before{content:none!important;display:none!important}}
