.desk { padding: 36px 0 88px; }
.desk-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 28px;
}
.desk-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 20px; }
.desk-account {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 6px 6px 6px 14px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 32, 64, 0.06);
    color: var(--ink-soft);
    font-size: 14px;
}
#desk-email { color: var(--night); }
#logout-btn {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--accent);
}
#logout-btn:hover { background: var(--ice); }
.desk-top h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 520;
    letter-spacing: -0.045em;
    color: var(--night);
}
.desk-nav { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 8px 24px rgba(16, 32, 64, 0.06); }
.desk-nav a {
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--ink);
    transition: background 180ms ease, color 180ms ease;
}
.desk-nav a:hover { background: var(--ice); }
.desk-nav a.is-on { background: var(--night); color: #fff; }
.desk-gate { padding: 64px 0; color: var(--ink-soft); }
.desk-split { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 16px; align-items: start; }
.desk-split > * { min-width: 0; }
.rail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow);
    min-height: 320px;
}
#ticket-list { flex: 1; display: flex; flex-direction: column; }
.rail > .fine,
#ticket-list > .fine {
    flex: 1;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 20px 16px 28px;
    text-align: center;
}
.order-row {
    width: 100%;
    display: grid;
    gap: 2px;
    text-align: left;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--ink);
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}
.order-row strong { font-weight: 540; letter-spacing: -0.02em; }
.order-row span { color: var(--ink-soft); font-size: 13px; }
.order-row:hover { background: var(--ice); }
.order-row.is-on { background: var(--night); color: #fff; }
.order-row.is-on span { color: rgba(255, 255, 255, 0.72); }
.detail:not([hidden]) {
    display: grid;
    gap: 18px;
    min-width: 0;
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow);
    animation: desk-in 420ms ease;
}
.detail-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.detail-head h2, .detail > form > h2, .ticket-view > h2, #reset-pane h2 {
    min-width: 0;
    font-size: 28px;
    font-weight: 520;
    letter-spacing: -0.03em;
    color: var(--night);
    overflow-wrap: anywhere;
}
.pill { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--ice); color: var(--accent); }
.pill-pending_setup { background: #f4efe4; color: #8a5a12; }
.cred, .spec { display: grid; }
.cred div, .spec div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}
.cred div:last-child, .spec div:last-child { border-bottom: 0; }
.cred span, .spec span { color: var(--ink-soft); }
.cred .ip-cell.is-many { display: block; padding-top: 11px; padding-bottom: 0; }
.cred .ip-head,
.cred .ip-value {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 0;
    border: 0;
}
.cred .ip-value { width: auto; margin-left: auto; justify-content: flex-end; }
.cred .ip-cell.is-many .ip-head { padding-bottom: 11px; border-bottom: 1px solid var(--line); }
#order-ip-count[hidden],
#order-ip-copy-all[hidden],
#order-ip-list[hidden],
#order-ip[hidden],
#order-ip-filter[hidden] { display: none !important; }
#order-ip-copy-all,
.ip-row button {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--accent);
}
#order-ip-filter {
    width: 100%;
    height: 40px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: var(--ink);
}
#order-ip-filter:focus { outline: none; border-bottom-color: var(--accent); }
#order-ip-list {
    width: 100%;
    max-height: 240px;
    margin: 0;
    padding: 0;
    overflow: auto;
    list-style: none;
}
.ip-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}
.ip-row[hidden] { display: none; }
.ip-row:last-child { border-bottom: 0; }
.ip-row em {
    margin-right: auto;
    color: var(--ink-soft);
    font-style: normal;
    font-size: 14px;
}
.ip-row em:empty { display: none; }
.ip-row span {
    color: var(--night);
    font-weight: 540;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.cred code, .cred b, .spec b {
    min-width: 0;
    font-weight: 540;
    text-align: right;
    color: var(--night);
    overflow-wrap: anywhere;
}
.cred-actions, .power-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.power-row button, .cred-actions button, #ticket-close, #reset-send button {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.power-row button:hover, .cred-actions button:hover, #ticket-close:hover, #reset-send button:hover {
    background: var(--ice);
    border-color: transparent;
}
.power-row button:active, .cred-actions button:active, .order-row:active { transform: scale(0.98); }
.power-row button:disabled { opacity: 0.4; transform: none; }
.power-row button.is-accent, #new-ticket, #bill-pay {
    background: var(--night);
    color: #fff;
    border-color: var(--night);
}
.power-row button.is-accent:hover, #new-ticket:hover, #bill-pay:hover { background: var(--accent-press); }
#new-ticket {
    min-height: 40px;
    margin-bottom: 4px;
    border-radius: 14px;
}
.detail form:not([hidden]) { display: grid; gap: 2px; max-width: 460px; }
#ticket-reply .btn,
#ticket-close {
    width: 100%;
    max-width: 460px;
    min-height: 44px;
    justify-self: start;
}
.detail textarea, .detail .field input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fb;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.detail textarea {
    min-height: 140px;
    padding: 12px 14px;
    resize: vertical;
}
.detail .field input { height: 46px; padding: 0 14px; }
.detail textarea:focus, .detail .field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 79, 140, 0.16);
}
.ticket-view:not([hidden]) { display: grid; gap: 14px; min-width: 0; }
.ticket-view article { min-width: 0; padding: 14px 0; border-top: 1px solid var(--line); }
.ticket-view article:first-child { border-top: 0; padding-top: 0; }
.ticket-view article span { color: var(--ink-soft); font-size: 13px; }
.ticket-view article p {
    min-width: 0;
    margin-top: 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.bill-amount {
    margin: 0;
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 520;
    letter-spacing: -0.045em;
    color: var(--night);
    font-variant-numeric: tabular-nums;
}
#reset-pane:not([hidden]) { display: grid; gap: 22px; }
#order-pending { color: var(--ink-soft); }
@keyframes desk-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@media (max-width: 800px) {
    .desk-top, .desk-split, .detail-head, .desk-side { grid-template-columns: 1fr; display: grid; }
    .desk-nav, .desk-account { justify-content: flex-start; }
    .rail { min-height: 0; }
    .detail { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .detail, .order-row, .desk-nav a, .power-row button, .cred-actions button { animation: none; transition: none; }
}
