@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --shell: #13243a;
    --shell-deep: #0e1c2e;
    --shell-raised: #1b3553;
    --shell-hover: #22436a;
    --shell-border: #2c4a6b;
    --shell-text: #c9d6e4;
    --shell-muted: #8299b2;

    --page: #e8edf3;
    --surface: #ffffff;
    --surface-muted: #f6f8fa;
    --surface-inset: #e5eaf0;
    --border: #c7d0d9;
    --border-strong: #9caab8;
    --text: #17212b;
    --text-muted: #627184;

    --primary: #2d68ad;
    --primary-hover: #245892;
    --primary-pressed: #1d4777;
    --primary-soft: #e6f0fa;
    --primary-glow: #7fb4ec;

    --danger: #b91c1c;
    --danger-soft: #fdecec;
    --warn: #b45309;
    --warn-soft: #fef3e0;
    --success: #1f7a5c;
    --success-soft: #ecfdf5;
    --info: #1d4ed8;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--page);
    color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

.brand-block { padding-bottom: 18px; }
.brand { font-weight: 700; font-size: 17px; color: #fff; display: block; letter-spacing: -0.02em; }
.brand-sub { font-size: 11px; color: var(--shell-muted); margin-top: 2px; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--shell);
    border-right: 1px solid var(--shell-border);
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--shell-muted);
    margin: 16px 10px 6px;
    font-weight: 600;
}
.sidenav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--shell-text);
    font-size: 14px;
    font-weight: 500;
}
.nav-link:hover { background: var(--shell-hover); }
.nav-link.active { background: var(--primary-soft); color: var(--primary-pressed); }
.nav-badge { background: #e01b1b; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.nav-link-locked { opacity: 0.45; cursor: default; }
.nav-badge-lock { background: var(--shell-raised); color: var(--shell-muted); border: 1px solid var(--shell-border); }

.sidebar-spacer { flex: 1; }

.sidebar-user { border-top: 1px solid var(--shell-border); padding-top: 14px; margin-top: 10px; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-user-role { font-weight: 400; color: var(--shell-muted); }
.sidebar-user-pts { font-size: 12px; color: var(--primary-glow); font-weight: 700; margin: 4px 0 8px; }
.sidebar-user-pts .muted-row { color: var(--shell-muted); font-weight: 400; }
.plan-pill { display: inline-block; background: var(--shell-raised); border: 1px solid var(--shell-border); color: var(--shell-text); font-size: 11px; padding: 4px 10px; border-radius: 20px; }

.sidebar-pillnav { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.pill-btn {
    background: var(--shell-raised);
    border: 1px solid var(--shell-border);
    color: var(--shell-text);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
}
.pill-btn:hover { background: var(--shell-hover); }
.pill-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill-btn-danger { color: #f3a5a5; }
.pill-btn-danger:hover { background: rgba(185,28,28,0.2); }

.app-main { flex: 1; max-width: 1200px; padding: 28px; }
.idle-banner { background: var(--success-soft); color: var(--success); border: 1px solid var(--success); padding: 10px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 18px; }
.app-main-auth { max-width: none; margin: 0 auto; padding: 0; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(23,33,43,0.04);
}
.card h2 { margin-top: 0; }
.card-header-row { display: flex; justify-content: space-between; align-items: center; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ticket-preview { grid-column: 1 / -1; }

.muted { color: var(--text-muted); font-size: 14px; }

.career-title-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.career-title { font-size: 15px; font-weight: 700; color: var(--primary); }
.career-desc { margin: 2px 0 10px; }

.xp-bar { height: 8px; background: var(--surface-inset); border-radius: 10px; overflow: hidden; margin: 12px 0 4px; }
.xp-bar-fill { height: 100%; background: var(--primary); }

.stat-row { display: flex; gap: 24px; margin-top: 16px; }
.stat-row div { display: flex; flex-direction: column; }
.stat-row strong { font-size: 22px; }
.stat-row span { color: var(--text-muted); font-size: 12px; }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-pressed); }
.btn-small {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}
.btn-small:hover { border-color: var(--border-strong); }

.ticket-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.ticket-table th { text-align: left; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px; border-bottom: 1px solid var(--border); }
.ticket-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }

.badge { padding: 2px 9px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: capitalize; background: var(--surface-inset); color: var(--text-muted); }
.badge.prio-urgent { background: var(--danger-soft); color: var(--danger); }
.badge.prio-high { background: var(--warn-soft); color: var(--warn); }
.badge.prio-normal { background: var(--primary-soft); color: var(--primary); }
.badge.prio-low { background: var(--surface-inset); color: var(--text-muted); }
.badge.status-resolved { background: var(--success-soft); color: var(--success); }
.badge.status-open { background: var(--primary-soft); color: var(--primary); }
.badge.status-in_progress { background: var(--warn-soft); color: var(--warn); }
.badge.status-escalated { background: var(--danger-soft); color: var(--danger); }

.filter-row { display: flex; gap: 8px; margin: 12px 0; }
.chip { padding: 5px 13px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; margin-top: 16px; }
.skill-tile { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.skill-tile.locked { opacity: 0.6; }
.skill-icon { display: none; }
.skill-tile h3 { margin: 0 0 4px; font-size: 14px; }
.skill-tile p { font-size: 13px; color: var(--text-muted); }

/* Auth pages */
.auth-wrap { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: var(--shell-deep); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 32px; width: 360px; box-shadow: 0 8px 30px rgba(0,0,0,0.25); }
.auth-card h1 { margin: 0 0 4px; font-size: 20px; }
.auth-card label { display: block; margin: 14px 0 4px; font-size: 13px; color: var(--text-muted); }
.auth-card input { width: 100%; padding: 9px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; }
.auth-card input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.auth-card .btn-primary { width: 100%; margin-top: 20px; padding: 10px; }
.switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.alert { background: var(--danger-soft); color: var(--danger); padding: 10px; border-radius: 6px; font-size: 13px; margin-bottom: 10px; }

/* Ticket workspace */
.ticket-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
.ticket-header { display: flex; justify-content: space-between; align-items: flex-start; }
.ticket-badges { display: flex; gap: 8px; }
.problem-desc { background: var(--surface-muted); padding: 10px 14px; border-radius: 6px; font-size: 13px; color: var(--text-muted); border: 1px solid var(--border); }

.chat-box { height: 360px; overflow-y: auto; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 80%; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.chat-msg strong { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.chat-msg p { margin: 0; }
.chat-msg.customer { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.chat-msg.agent { align-self: flex-end; background: var(--primary); color: white; }
.chat-msg.agent strong { color: rgba(255,255,255,0.75); }
.chat-msg.system { align-self: center; background: transparent; color: var(--text-muted); font-style: italic; }

.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; padding: 9px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; }
.chat-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.rdp-window { border-radius: 10px; overflow: hidden; border: 1px solid var(--shell-border); box-shadow: 0 12px 32px rgba(8,14,22,0.35); }

.rdp-titlebar {
    background: linear-gradient(180deg, #16293f, var(--shell-deep));
    color: var(--shell-text);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    font-size: 12px;
    border-bottom: 1px solid var(--shell-border);
}
.rdp-titlebar-main { font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rdp-pill { padding: 3px 9px; border-radius: 10px; font-weight: 600; font-size: 11px; flex-shrink: 0; }
.rdp-pill-good { background: rgba(31,122,92,0.25); color: #4fd1a5; }
.rdp-titlebar-action {
    color: var(--shell-muted);
    cursor: default;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 5px;
}
.rdp-titlebar-disconnect {
    margin-left: auto;
    color: var(--shell-muted);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 5px;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.rdp-titlebar-disconnect.connected { color: #ff9b9b; background: rgba(255,90,90,0.12); }

.fake-desktop {
    background:
        radial-gradient(ellipse at 30% 0%, rgba(255,255,255,0.08), transparent 55%),
        linear-gradient(195deg, #4a7363 0%, #345745 35%, #1e3a2c 65%, #0e2018 100%);
    min-height: 480px;
    padding: 18px 18px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rdp-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,18,14,0.88);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: opacity 0.3s;
}
.rdp-overlay.hidden { display: none; }
.rdp-overlay-inner {
    text-align: center;
    max-width: 280px;
    background: rgba(19,36,58,0.9);
    border: 1px solid var(--shell-border);
    border-radius: 12px;
    padding: 28px 24px;
}
.rdp-overlay-title { color: #fff; font-weight: 700; font-size: 16px; margin: 0 0 8px; }
.rdp-overlay-sub { color: var(--shell-muted); font-size: 13px; margin: 0 0 18px; line-height: 1.4; }
.rdp-locked-note { font-size: 12px; color: var(--text-muted); margin: 10px 0; font-style: italic; }

.fake-taskbar {
    margin: auto -18px 0;
    background: rgba(12,20,16,0.82);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    flex-shrink: 0;
}
.taskbar-start {
    color: #fff;
    font-size: 15px;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 6px;
}
.taskbar-start:hover { background: rgba(255,255,255,0.12); }
.taskbar-pinned { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.pinned-icon {
    width: 30px; height: 30px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); color: #fff;
    font-size: 11px; font-weight: 700; cursor: pointer;
}
.pinned-icon:hover { background: rgba(255,255,255,0.18); }

.weather-chip {
    position: absolute; left: 18px; bottom: 54px;
    display: flex; align-items: baseline; gap: 8px;
    color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    z-index: 2;
}
.weather-temp { font-size: 20px; font-weight: 300; }
.weather-desc { font-size: 11px; }
.taskbar-search {
    background: rgba(255,255,255,0.1);
    color: var(--shell-muted);
    font-size: 12px;
    padding: 7px 16px;
    border-radius: 16px;
    width: 180px;
    margin-left: 6px;
}
.taskbar-spacer { flex: 1; }
.taskbar-tray {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--shell-text);
    font-size: 13px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    padding: 4px 10px;
}
.tray-icon {
    opacity: 0.85;
    min-width: 30px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 4px;
    padding: 0 6px;
}
.tray-icon:hover { background: rgba(255,255,255,0.1); }
.tray-clock { font-size: 12px; font-weight: 600; color: #fff; margin-left: 8px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.15); }

.screen-label { font-size: 11px; color: rgba(255,255,255,0.55); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.window-area { display: flex; flex-direction: column; gap: 14px; flex: 1; }

.desktop-icons {
    display: grid;
    grid-template-columns: repeat(auto-fill, 76px);
    grid-auto-flow: column;
    grid-template-rows: repeat(5, auto);
    gap: 10px 4px;
    margin-bottom: 4px;
    align-self: flex-start;
}
.desktop-icon {
    background: transparent;
    border: 1px solid transparent;
    color: #fff;
    width: 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 4px;
    cursor: pointer;
}
.desktop-icon:hover { background: rgba(255,255,255,0.14); }
.desktop-icon:focus-visible { background: rgba(45,104,173,0.4); outline: 1px solid rgba(255,255,255,0.4); }
.desktop-icon-glyph {
    width: 38px; height: 38px; border-radius: 9px;
    background: linear-gradient(150deg, #4f8fd6, var(--primary-pressed));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
.desktop-icon-label {
    font-size: 11px; text-align: center; line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    max-width: 76px;
}
.desktop-icon-glyph.decor { background: linear-gradient(150deg, #7a8699, #4a5566); }

.win-tabs { display: flex; gap: 2px; background: var(--surface-muted); padding: 0 8px; border-bottom: 1px solid var(--border); }
.win-tab { font-size: 11px; padding: 7px 10px; color: var(--text-muted); border-bottom: 2px solid transparent; }
.win-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.win-breadcrumb { background: var(--surface-muted); padding: 6px 12px; font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; }
.decor-row { opacity: 0.45; }
.win-table tr.decor-row td { color: var(--text-muted); }

.notif-stack { display: flex; flex-direction: column; gap: 6px; }
.notif {
    background: rgba(255,255,255,0.95);
    border-left: 3px solid var(--warn);
    color: #7a4a0c;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.panel { background: #fff; border: 1px solid #d8dde4; border-radius: 8px; padding: 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.18); }
.panel h4 { margin: 0 0 8px; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.panel table { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--text); }
.panel th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 5px 6px; border-bottom: 1px solid var(--border); }
.panel td { padding: 5px 6px; border-top: 1px solid var(--border); }
.panel tr.suspicious td { color: var(--danger); font-weight: 500; }

.fake-window {
    position: absolute;
    background: #fff;
    border: 1px solid #d8dde4;
    border-radius: 9px;
    width: 300px;
    max-width: calc(100% - 20px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: window-pop 0.16s ease-out;
}
@keyframes window-pop {
    from { opacity: 0; transform: scale(0.97) translateY(4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.fake-window.dragging { box-shadow: 0 24px 56px rgba(0,0,0,0.55); opacity: 0.97; cursor: grabbing; transition: none; }
.fake-window-title {
    background: var(--surface-muted);
    color: var(--text);
    padding: 9px 10px 9px 12px;
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    cursor: grab;
    user-select: none;
}
.fake-window-title-text { display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fake-window-title-text::before {
    content: '';
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}
.win-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 20px; height: 20px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.win-close:hover { background: var(--danger); color: #fff; }
.fake-window-body { padding: 12px; font-size: 12px; color: var(--text-muted); max-height: 260px; overflow-y: auto; }
.fake-window-body p { margin: 4px 0; }

.win-table { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--text); margin-bottom: 8px; }
.win-table th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.win-table td { padding: 7px 8px; border-top: 1px solid var(--surface-inset); vertical-align: middle; }
.win-table tr:nth-child(even) td { background: var(--surface-muted); }
.win-table tr.suspicious td { color: var(--danger); font-weight: 500; background: var(--danger-soft); }
.win-table tr:hover td { background: var(--primary-soft); }

.win-list { list-style: none; margin: 0 -12px 8px; padding: 0; display: flex; flex-direction: column; }
.win-list li {
    font-size: 12px; word-break: break-all;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 7px 12px; border-bottom: 1px solid var(--surface-inset);
}
.win-list li:nth-child(even) { background: var(--surface-muted); }
.win-list li.deleted { color: var(--success); text-decoration: line-through; }

.action-btn-inline {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}
.action-btn-inline:hover { background: var(--primary-hover); }

.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.action-row.panel { background: #fff; }
.action-row .action-btn { font-size: 12px; padding: 7px 12px; }
.progress-note { margin: 0 0 10px; }

.bsod {
    background: var(--info);
    color: white;
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.bsod-face { font-size: 38px; margin-bottom: 14px; font-family: 'JetBrains Mono', monospace; }
.bsod-notifs { font-size: 12px; margin-top: 18px; opacity: 0.85; font-family: 'JetBrains Mono', monospace; }

.login-screen {
    text-align: center;
    padding: 50px 30px;
    background: #fff;
    border-radius: 10px;
    max-width: 320px;
    margin: 20px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    color: var(--text);
}
.avatar-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; box-shadow: 0 4px 12px rgba(45,104,173,0.4); }
.login-screen input { margin-top: 14px; padding: 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-muted); color: var(--text); width: 80%; }

.bios-screen, .setup-screen {
    font-family: 'JetBrains Mono', monospace;
    color: #7ee0c0;
    background: #06100a;
    padding: 22px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    line-height: 1.8;
}

.action-toolbox { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.action-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn.done { background: var(--success-soft); border-color: var(--success); color: var(--success); }
.action-btn .check { margin-left: 6px; }
.action-btn:disabled { opacity: 0.6; cursor: default; }

.resolve-btn { width: 100%; margin-top: 8px; }

.rdp-launcher { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin: 12px 0; }
.rdp-launcher-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.rdp-launcher-label { color: var(--text-muted); }
.rdp-launcher-value { font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.rdp-launcher .btn-primary { width: 100%; margin-top: 4px; }
.rdp-launcher-hint { font-size: 12px; margin: 10px 0 0; }

.remote-footer-note { text-align: center; margin-top: 10px; }

.shady-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px dashed var(--danger);
    border-radius: 8px;
    background: var(--danger-soft);
}
.shady-panel h3 { margin: 0 0 4px; color: var(--danger); font-size: 14px; }
.shady-warning { font-size: 12px; margin: 0 0 10px; }
.shady-options { display: flex; flex-direction: column; gap: 8px; }
.shady-btn {
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--danger);
    border-radius: 6px;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.shady-btn:hover { background: #fff4f4; }
.shady-btn-label { font-weight: 700; font-size: 13px; color: var(--danger); }
.shady-btn-desc { font-size: 12px; color: var(--text-muted); }
.shady-btn-payout { font-size: 11px; font-weight: 600; color: var(--success); margin-top: 2px; }
.resolved-banner { background: var(--success-soft); border: 1px solid var(--success); color: var(--success); padding: 12px; border-radius: 6px; text-align: center; font-weight: 600; margin-top: 8px; }

.sla-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-muted); margin: -6px 0 10px; }
.sla-bar { flex: 1; height: 5px; background: var(--surface-inset); border-radius: 10px; overflow: hidden; }
.sla-bar-fill { height: 100%; background: var(--success); }
.sla-row.sla-warning .sla-bar-fill { background: var(--warn); }
.sla-row.sla-warning span:last-child { color: var(--warn); }
.sla-row.sla-breached .sla-bar-fill { background: var(--danger); }
.sla-row.sla-breached span:last-child { color: var(--danger); font-weight: 600; }

.leaderboard-table td.you { color: var(--primary); font-weight: 600; }
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 4px; background: var(--surface-inset); font-size: 11px; font-weight: 700; color: var(--text-muted); }
.rank-badge.gold { background: #f5c518; color: #17212b; }
.rank-badge.silver { background: #c9ccd3; color: #17212b; }
.rank-badge.bronze { background: #cd7f32; color: #fff; }

.career-ladder { display: flex; flex-direction: column; margin-top: 16px; }
.ladder-step { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.ladder-step::before {
    content: '';
    position: absolute; left: 5px; top: 22px; bottom: -4px;
    width: 2px; background: var(--border);
}
.ladder-step:last-child::before { display: none; }
.ladder-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-inset); border: 2px solid var(--border-strong); flex-shrink: 0; margin-top: 4px; z-index: 1; }
.ladder-step.reached .ladder-dot { background: var(--primary); border-color: var(--primary); }
.ladder-step.current .ladder-dot { box-shadow: 0 0 0 4px var(--primary-soft); }
.ladder-step.reached .ladder-title { color: var(--text); }
.ladder-step:not(.reached) .ladder-title { color: var(--text-muted); }
.ladder-title { font-weight: 600; font-size: 14px; }
.ladder-step.current .ladder-title { color: var(--primary); }
.ladder-desc { font-size: 13px; margin-top: 2px; }

/* Messages inbox */
.conv-list { display: flex; flex-direction: column; margin-top: 12px; }
.conv-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.conv-row:hover { background: var(--surface-muted); border-radius: 6px; }
.conv-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-inset); color: var(--text-muted); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.conv-body { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; align-items: baseline; }
.conv-time { font-size: 11px; color: var(--text-muted); }
.conv-sub { font-size: 12px; color: var(--text-muted); margin: 2px 0; }
.conv-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you-prefix { color: var(--primary); font-weight: 600; }

/* Issue library */
.issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; margin-top: 16px; }
.issue-tile { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.issue-tile.locked { opacity: 0.55; }
.issue-top { display: flex; justify-content: space-between; align-items: center; }
.issue-tile h3 { font-size: 14px; margin: 10px 0 6px; }
.issue-tile p { font-size: 13px; color: var(--text-muted); min-height: 54px; }
.issue-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; }
.diff-dots { color: var(--warn); letter-spacing: 2px; }
.lock-icon { display: none; }
.issue-start-form { margin-top: 10px; }
.issue-start-btn { width: 100%; }

/* Ticket system UI (SysDesks-style) */
.svc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.svc-header h2 { margin: 0; font-size: 20px; }
.btn-dark { background: var(--shell); color: #fff; border: none; padding: 9px 16px; border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; }
.btn-dark:hover { background: var(--shell-hover); }

.svc-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); margin: 18px 0 14px; }
.svc-tab { padding: 0 0 10px; font-size: 14px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent; }
.svc-tab.active { color: var(--text); font-weight: 700; border-bottom-color: var(--primary); }
.svc-tab-count { background: var(--surface-inset); color: var(--text-muted); font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.svc-tab.active .svc-tab-count { background: var(--primary-soft); color: var(--primary); }

.svc-search { margin-bottom: 14px; }
.tix-search { display: flex; gap: 8px; }
.tix-search input { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; width: 300px; }

.tix-list-card { padding: 0; overflow: hidden; }
.tix-list { display: flex; flex-direction: column; }
.tix-row {
    display: grid;
    grid-template-columns: 100px 2.4fr 110px 110px 90px 70px 170px;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}
.tix-row:last-child { border-bottom: none; }
.tix-row:not(.tix-row-head):hover { background: var(--surface-muted); }
.tix-row-head { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; padding-top: 14px; padding-bottom: 14px; }
.tix-col-num { font-family: 'JetBrains Mono', monospace; color: var(--primary); font-weight: 600; font-size: 12px; }
.cat-main { font-weight: 500; }
.cat-sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 260px; }

.prio-text, .status-text { font-weight: 600; font-size: 12px; }
.prio-urgent { color: var(--danger); }
.prio-high { color: #c2660f; }
.prio-normal { color: var(--text-muted); }
.prio-low { color: var(--text-muted); }
.status-text-new { color: var(--text-muted); }
.status-text-progress { color: var(--primary); }
.status-text-waiting { color: var(--warn); }
.status-text-escalated { color: var(--danger); }
.status-text-resolved { color: var(--success); }
.status-text-closed { color: var(--text-muted); }

.tix-col-assign { color: var(--text); }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { display: none; }

/* Business owner tier */
.business-hero { background: linear-gradient(135deg, var(--shell), var(--shell-deep)); border-color: var(--shell-border); }
.business-hero h2 { color: #fff; margin-bottom: 4px; }
.business-hero .muted { color: var(--shell-muted); }
.shop-name-form { display: flex; gap: 8px; margin-top: 14px; }
.shop-name-form input { padding: 8px 12px; border-radius: 6px; border: 1px solid var(--shell-border); background: var(--shell-raised); color: #fff; font-size: 13px; width: 240px; }

.breakdown-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.breakdown-row { display: flex; align-items: center; gap: 10px; }
.breakdown-label { width: 90px; font-size: 13px; flex-shrink: 0; }
.breakdown-bar { flex: 1; height: 8px; background: var(--surface-inset); border-radius: 10px; overflow: hidden; }
.breakdown-bar-fill { height: 100%; background: var(--primary); }
.breakdown-count { font-size: 12px; color: var(--text-muted); width: 20px; text-align: right; }

#toast-root { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border-strong);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    max-width: 320px;
    box-shadow: 0 4px 16px rgba(23,33,43,0.12);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

@media (max-width: 1000px) {
    .tix-row { grid-template-columns: 1fr; gap: 4px; padding: 14px; }
    .tix-row-head { display: none; }
    .tix-col-id::before { content: 'Ticket '; }
}

@media (max-width: 900px) {
    .dash-grid, .ticket-layout { grid-template-columns: 1fr; }
}
