/* RedHaze Desk · ticket subsystem styling.
 * Pairs with apple.css; adds ticket-specific layout + status badges.
 */

.desk-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px var(--pad-x) 80px;
}

.desk-hero {
    background: linear-gradient(135deg, #0b0c0e, #1d1d1f);
    color: #fff;
    border-radius: 26px;
    padding: 56px 44px;
    margin-bottom: 36px;
}
.desk-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 50px);
    letter-spacing: -0.02em;
}
.desk-hero p {
    margin: 0 0 22px;
    color: rgba(255,255,255,0.78);
    font-size: 17px;
    max-width: 760px;
}

.desk-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.desk-section-title {
    margin: 32px 0 14px;
    font-size: 26px;
    letter-spacing: -0.01em;
}

.desk-ticket-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.desk-ticket-card {
    background: var(--hue-bg-strong);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--hue-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.desk-ticket-card .title {
    font-weight: 600;
    color: var(--hue-ink);
    text-decoration: none;
    font-size: 16px;
}
.desk-ticket-card .meta {
    color: var(--hue-ink-muted);
    font-size: 13px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
    color: var(--hue-ink-soft);
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}
.status-badge.status-open       { background: rgba(0,113,227,0.14); color: #0071e3; }
.status-badge.status-pending    { background: rgba(255,159,10,0.18); color: #b25d00; }
.status-badge.status-resolved   { background: rgba(48,209,88,0.18); color: #1e7d3d; }
.status-badge.status-closed     { background: rgba(0,0,0,0.10); color: #515154; }
.status-badge.status-cancelled  { background: rgba(220,30,52,0.16); color: var(--hue-accent); }
.status-badge.status-reopened   { background: rgba(255,159,10,0.22); color: #b25d00; }
.status-badge.status-merged     { background: rgba(120,80,200,0.18); color: #5b3fa3; }
.status-badge.status-escalated  { background: rgba(220,30,52,0.22); color: var(--hue-accent); }

.desk-empty {
    background: var(--hue-bg-strong);
    border-radius: 18px;
    padding: 36px;
    box-shadow: var(--hue-shadow-soft);
    text-align: center;
}

.desk-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--hue-bg-strong);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--hue-shadow-soft);
    max-width: 720px;
}
.desk-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--hue-ink-soft);
}
.desk-form label.inline {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
.desk-form input, .desk-form textarea, .desk-form select {
    border: 1px solid var(--hue-line);
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    font-size: 14px;
}
.desk-form button {
    align-self: flex-start;
}
.desk-result {
    background: #0b0c0e;
    color: #f3f4f6;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    overflow-x: auto;
    min-height: 0;
}

.desk-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--hue-bg-strong);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--hue-shadow-soft);
    margin-top: 18px;
}
.desk-table th, .desk-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--hue-line);
    font-size: 14px;
}
.desk-table th { background: rgba(0,0,0,0.03); font-weight: 600; }

.ticket-head {
    background: var(--hue-bg-strong);
    border-radius: 16px;
    padding: 26px 28px;
    margin: 24px 0;
    box-shadow: var(--hue-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ticket-head h1 {
    margin: 0;
    font-size: clamp(22px, 2.5vw, 30px);
}
.ticket-head .meta { color: var(--hue-ink-soft); font-size: 14px; }

.ticket-body {
    background: var(--hue-bg-strong);
    border-radius: 14px;
    padding: 22px 26px;
    box-shadow: var(--hue-shadow-soft);
    line-height: 1.7;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comment {
    background: var(--hue-bg-strong);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: var(--hue-shadow-soft);
}
.comment .meta { color: var(--hue-ink-muted); font-size: 12px; margin-bottom: 6px; }
.comment .body { font-size: 14.5px; line-height: 1.6; }
.comment.internal-only { border-left: 3px solid var(--hue-accent); }
.comment.empty { background: transparent; box-shadow: none; padding: 0; color: var(--hue-ink-muted); }
.tag {
    display: inline-block;
    padding: 1px 8px;
    background: var(--hue-accent-soft);
    color: var(--hue-accent);
    border-radius: 999px;
    font-size: 11px;
    margin-left: 6px;
}

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}
.attachment-list li {
    background: var(--hue-bg-strong);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: var(--hue-shadow-soft);
    margin: 0 0 8px;
    font-size: 14px;
}

.desk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.desk-tile {
    background: var(--hue-bg-strong);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--hue-shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.desk-tile h3 { margin: 0; font-size: 18px; }

.back {
    display: inline-block;
    margin: 0 0 12px;
    color: var(--hue-blue);
    font-size: 14px;
    text-decoration: none;
}
.back:hover { text-decoration: underline; }
