/* Executive Royal Purple Workspace Theme & High-Craft Motion System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --royal: #6d28d9;
    --royal-deep: #5b21b6;
    --royal-hover: #4c1d95;
    --royal-vibrant: #7c3aed;
    --royal-soft: #f5f3ff;
    --royal-tint: #ede9fe;
    --royal-border: #ddd6fe;
    --royal-glow: rgba(124, 58, 237, 0.18);
    --green: var(--royal);
    --green-dark: var(--royal-hover);
    --sage: var(--royal-soft);
    --ink: #0f0d1c;
    --muted: #5b5675;
    --line: #e4e2f0;
    --background: #faf9fe;
    --white: #ffffff;
    --font: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', sans-serif;
}

body { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: #ddd6fe; color: #3b0764; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #faf9fe; }
::-webkit-scrollbar-thumb { background: #cfcbe3; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #a79ec7; }

h1, h2, h3, .brand, .metric-value { font-family: var(--font); }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1.3; color: var(--ink); }
h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.4px; color: var(--ink); }
h3 { color: var(--ink); }

button:focus-visible, a:focus-visible { outline-color: var(--royal-vibrant); }
input, select, textarea, .select-trigger { border-color: #cfcbe3; border-radius: 9px; }
input:focus, select:focus, textarea:focus, .select-trigger[aria-expanded=true] {
    border-color: var(--royal-vibrant);
    box-shadow: 0 0 0 3px var(--royal-glow);
}
input::placeholder, textarea::placeholder { color: #8c86a6; }

.eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: var(--royal-deep);
    margin-bottom: 6px;
}

/* Navigation & Brand Identity */
.sidebar { width: 256px; padding: 20px 20px 0; border-color: var(--line); z-index: 30; }
.brand { gap: 10px; font-size: 22px; letter-spacing: -0.8px; padding: 0 4px; margin-bottom: 26px; line-height: 32px; }
.brand-mark {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(91, 33, 182, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.28s var(--ease-spring), box-shadow 0.28s var(--ease-smooth);
}
.brand:hover .brand-mark {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.brand-name { display: flex; align-items: baseline; }
.brand-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--royal-vibrant);
    border-radius: 50%;
    margin-left: 2px;
}
.workspace-label {
    margin: 0 0 24px;
    padding: 12px;
    gap: 10px;
    border-radius: 12px;
    background: #f6f4fc;
    border-color: var(--line);
}
.workspace-label strong { font-size: 12px; color: var(--ink); font-weight: 700; letter-spacing: -0.2px; }
.workspace-label small { font-size: 11px; color: var(--muted); margin-top: 0; }
.workspace-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--royal-tint);
    border-color: var(--royal-border);
    color: var(--royal-deep);
}
.nav-caption { font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 0 10px; color: #847ea0; margin: 24px 0 8px; }
.sidebar nav > a {
    padding: 8px 12px;
    gap: 12px;
    margin: 3px 0;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: #46405e;
    transition: background 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), transform 0.22s var(--ease-spring);
}
.sidebar nav svg {
    width: 16px;
    height: 16px;
    color: #8b84a8;
    transition: color 0.2s var(--ease-smooth), transform 0.22s var(--ease-spring);
}
.sidebar nav > a:hover {
    background: var(--royal-soft);
    color: var(--ink);
    transform: translateX(2px);
}
.sidebar nav > a:hover svg { color: var(--royal-vibrant); }
.sidebar nav > a.active {
    background: var(--royal-soft);
    border-color: var(--royal-border);
    color: var(--royal-deep);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(91, 33, 182, 0.08);
}
.sidebar nav > a.active svg { color: var(--royal-vibrant); }
.tiny-label {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border: 1px solid var(--royal-border);
    color: var(--royal-deep);
    background: var(--royal-tint);
    border-radius: 999px;
}

.sidebar-bottom { padding-top: 20px; margin-left: 0; margin-right: 0; }
.assistant-mini {
    position: relative;
    overflow: hidden;
    padding: 12px 13px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #d8cefe;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--royal-deep);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.06);
    transition: transform 0.24s var(--ease-spring), box-shadow 0.24s var(--ease-smooth), border-color 0.24s var(--ease-smooth);
}
.assistant-mini::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.55) 50%, transparent 75%);
    transform: translateX(-130%);
    pointer-events: none;
    animation: shimmerSweep 7.5s var(--ease-smooth) infinite;
}
.assistant-mini:hover {
    transform: translateY(-2px);
    border-color: #c4b5fd;
    box-shadow: 0 8px 20px rgba(91, 33, 182, 0.14);
}
.assistant-mini:hover > svg:last-child { transform: translateX(3px); }
.assistant-mini > svg:last-child { transition: transform 0.22s var(--ease-spring); }
.assistant-mini .ai-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(91, 33, 182, 0.25);
}
.assistant-mini strong { flex: 1; font-size: 11px; color: var(--royal-deep); }

.profile { padding: 14px 4px 16px; gap: 10px; }
.profile strong { font-size: 12px; }
.profile small { font-size: 11px; color: var(--muted); }
.avatar {
    background: #ede9fe;
    color: #4c1d95;
    border: 1px solid #ddd6fe;
    font-weight: 700;
}
.avatar.lavender { background: #f3e8ff; color: #6b21a8; border-color: #e9d5ff; }
.avatar.peach { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.avatar.mint { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

/* Topbar & Live AI Status Pulse */
.main-shell { margin-left: 256px; width: calc(100% - 256px); min-width: 0; }
.topbar {
    height: 56px;
    min-height: 56px;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 20;
}
.breadcrumb { gap: 9px; font-size: 12px; font-weight: 500; color: var(--muted); }
.breadcrumb svg { color: #8b84a8; }
.breadcrumb strong { font-size: 12px; font-weight: 700; color: var(--ink); }
.crumb-slash { color: #cfcbe3; }
.topbar-right { gap: 14px; }
.connection {
    padding: 4px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f6f4fc;
    font-size: 11px;
    font-weight: 600;
    color: #46405e;
}
.connection i {
    width: 7px;
    height: 7px;
    background: #059669;
    position: relative;
}
.connection i:not(.offline)::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    opacity: 0;
    animation: statusPulse 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.connection i.offline { background: #9490ab; }
.demo-badge {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--royal-deep);
    border-color: var(--royal-border);
    border-radius: 8px;
    background: var(--royal-soft);
    box-shadow: 0 1px 2px rgba(91, 33, 182, 0.05);
}

/* Main Workspace & Interactive Buttons */
main#main-content { padding: 32px; max-width: 1280px; }
.page-heading { align-items: flex-end; margin-bottom: 28px; }
.page-heading p { font-size: 13px; font-weight: 500; color: var(--muted); margin-top: 6px; }

.button {
    padding: 10px 16px;
    border-color: #cfcbe3;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 13, 28, 0.04);
    transition: background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth), transform 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-smooth);
}
.button:hover:not(:disabled) {
    background: var(--royal-soft);
    border-color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(91, 33, 182, 0.08);
}
.button:active:not(:disabled) {
    transform: scale(0.985);
}
.button.primary {
    background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
    border-color: #5b21b6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.button.primary:hover:not(:disabled) {
    background: linear-gradient(180deg, #6d28d9 0%, #4c1d95 100%);
    border-color: #4c1d95;
    box-shadow: 0 6px 18px rgba(91, 33, 182, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.button.light {
    background: #ffffff;
    border-color: var(--royal-border);
    color: var(--royal-deep);
}
.button.light:hover:not(:disabled) {
    background: #ffffff;
    border-color: #a78bfa;
    box-shadow: 0 6px 16px rgba(91, 33, 182, 0.14);
}
.button.small { padding: 6px 11px; font-size: 11px; border-radius: 8px; }
.button svg { transition: transform 0.22s var(--ease-spring); }
.button:hover:not(:disabled) svg { transform: translateX(1.5px); }
.icon-button { color: #7e789c; border-radius: 8px; }
.icon-button:hover:not(:disabled) { background: var(--royal-soft); color: var(--royal-deep); }
.icon-button:active:not(:disabled) { transform: scale(0.95); }

/* Overview KPI Cards */
.metric-grid { gap: 16px; margin-bottom: 28px; }
.metric-card {
    position: relative;
    padding: 20px;
    border-radius: 16px;
    border-color: var(--line);
    box-shadow: 0 1px 3px rgba(15, 13, 28, 0.03), 0 6px 16px rgba(91, 33, 182, 0.03);
    transition: transform 0.26s var(--ease-spring), box-shadow 0.26s var(--ease-smooth), border-color 0.26s var(--ease-smooth);
}
a.metric-card:hover, .metric-card.interactive:hover {
    transform: translateY(-3px);
    box-shadow: var(--royal-shadow-hover);
    border-color: #c4b5fd;
}
a.metric-card:active { transform: scale(0.985); }
.metric-label { color: #46405e; font-size: 12px; font-weight: 700; letter-spacing: -0.2px; }
.metric-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 9px;
    background: var(--royal-soft);
    color: var(--royal);
    transition: transform 0.26s var(--ease-spring), background 0.2s var(--ease-smooth);
}
a.metric-card:hover .metric-icon { transform: scale(1.08); }
.metric-icon.royal { background: var(--royal-tint); color: var(--royal-deep); }
.metric-icon.indigo { background: #eef2ff; color: #4338ca; }
.metric-icon.amber { background: #fffbeb; color: #b45309; }
.metric-icon.sage { background: #ecfdf5; color: #047857; }
.metric-value { font-size: 30px; font-weight: 800; color: var(--ink); margin: 12px 0 10px; gap: 8px; }
.metric-card.has-alert .metric-value { color: #d97706; }
.metric-suffix { font-size: 11px; font-weight: 600; color: var(--muted); }
.metric-note {
    padding-top: 10px;
    border-top: 1px solid #eeecf7;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted);
    gap: 6px;
}
.metric-card.has-alert .metric-note { color: #b45309; }
.dot { width: 7px; height: 7px; }
.green { background: #059669; }
.royal-dot { background: #7c3aed; }
.amber-dot { background: #d97706; }

/* Panels, Animated Bar Chart & Insight Card */
.overview-middle { grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 28px; }
.panel {
    border-radius: 16px;
    border-color: var(--line);
    box-shadow: 0 1px 3px rgba(15, 13, 28, 0.03), 0 6px 16px rgba(91, 33, 182, 0.03);
    transition: box-shadow 0.24s var(--ease-smooth), border-color 0.24s var(--ease-smooth);
}
.panel-heading { padding: 20px 24px; }
.panel-heading p { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.subtle-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    background: #f6f4fc;
    color: #46405e;
    border-color: var(--line);
    border-radius: 8px;
    transition: background 0.18s var(--ease-smooth), border-color 0.18s var(--ease-smooth);
}
.chart-legend { font-size: 11px; color: var(--muted); margin-left: 24px; gap: 16px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.chart-legend .legend-dot.green, .legend-dot.created-dot { background: #7c3aed; }
.pale { background: #c4b5fd; }
.bar-chart {
    height: 188px;
    padding: 24px 24px 28px;
    margin: 8px 24px 20px;
    border-color: var(--line);
    background: repeating-linear-gradient(to top, transparent 0, transparent 35px, #f1effa 36px, transparent 37px);
}
.bar-pair { max-width: 34px; gap: 5px; }
.bar {
    border-radius: 4px 4px 0 0;
    transform-origin: bottom;
    animation: barGrow 0.68s var(--ease-spring) backwards;
    transition: filter 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}
.chart-day:nth-child(1) .bar { animation-delay: 0.04s; }
.chart-day:nth-child(2) .bar { animation-delay: 0.09s; }
.chart-day:nth-child(3) .bar { animation-delay: 0.14s; }
.chart-day:nth-child(4) .bar { animation-delay: 0.19s; }
.chart-day:nth-child(5) .bar { animation-delay: 0.24s; }
.chart-day:nth-child(6) .bar { animation-delay: 0.29s; }
.chart-day:nth-child(7) .bar { animation-delay: 0.34s; }
.bar.resolved { animation-duration: 0.78s; }
.bar.created {
    background: linear-gradient(180deg, #8b5cf6 0%, #5b21b6 100%);
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.18);
}
.bar.created:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}
.bar.resolved { background: linear-gradient(180deg, #ddd6fe 0%, #c4b5fd 100%); }
.bar.resolved:hover { filter: brightness(0.96); }
.bar span { color: var(--ink); font-size: 11px; font-weight: 700; }
.bar:hover span { transform: translateX(-50%) translateY(-2px); }
.day-label { color: var(--muted); font-size: 11px; font-weight: 600; }

.insight-card {
    border-color: #d3c6fe;
    border-radius: 16px;
    padding: 24px;
    background: radial-gradient(circle at 95% 8%, rgba(167, 139, 250, 0.34) 0%, transparent 55%),
                linear-gradient(145deg, #f5f3ff 0%, #ede9fe 65%, #e4dcfe 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 18px rgba(91, 33, 182, 0.07);
    transition: transform 0.26s var(--ease-spring), box-shadow 0.26s var(--ease-smooth);
}
.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(91, 33, 182, 0.12);
}
.insight-card:after, .insight-card:before {
    content: '';
    position: absolute;
    width: 196px;
    height: 196px;
    border: 1px solid rgba(124, 58, 237, 0.24);
    border-radius: 50%;
    right: -48px;
    bottom: -48px;
    top: auto;
    pointer-events: none;
    animation: ringBreathe 6.5s ease-in-out infinite;
}
.insight-card:before {
    width: 142px;
    height: 142px;
    bottom: -24px;
    right: -24px;
    border-color: rgba(109, 40, 217, 0.32);
    animation-delay: -3.2s;
}
.insight-card > * { position: relative; z-index: 1; }
.insight-label { color: var(--royal-deep); font-size: 10px; font-weight: 800; margin-bottom: 14px; }
.insight-card h2 { font-size: 21px; font-weight: 800; line-height: 1.38; color: #160d33; }
.insight-card p { font-size: 12px; color: #463d66; font-weight: 500; line-height: 1.7; max-width: none; }
.insight-stat {
    width: 100%;
    margin: auto 0 14px;
    padding-top: 18px;
    border-top: 1px solid rgba(124, 58, 237, 0.2);
    gap: 9px;
    align-items: baseline;
}
.insight-stat strong { font-size: 28px; font-weight: 800; color: var(--royal-deep); }
.insight-stat span { color: #4a416b; font-size: 11px; font-weight: 600; }
.insight-stat span br { display: none; }
.insight-card .button { padding: 8px 14px; font-size: 11px; margin-bottom: 0; }

/* Tables, Rows, Badges & Semantic SLAs */
.count-badge {
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    border-color: var(--royal-border);
    color: var(--royal-deep);
    background: var(--royal-soft);
}
.text-link { font-size: 12px; font-weight: 700; color: var(--royal); }
.text-link svg { transition: transform 0.2s var(--ease-spring); }
.text-link:hover svg { transform: translateX(3px); }

.ticket-table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    color: var(--muted);
    padding: 12px 16px;
    background: #f7f5fc;
    border-color: var(--line);
}
.ticket-table td {
    padding: 14px 16px;
    border-color: #eeecf7;
    font-size: 12px;
    transition: background-color 0.16s var(--ease-smooth);
}
.ticket-table tbody tr {
    transition: background-color 0.16s var(--ease-smooth);
}
.ticket-table tbody tr:hover { background: var(--royal-soft); }
.ticket-table tbody tr:hover .row-arrow {
    color: var(--royal-vibrant);
    transform: translateX(3px);
}
.row-arrow { color: #9c96b8; transition: transform 0.2s var(--ease-spring), color 0.18s var(--ease-smooth); }
.ticket-title { font-size: 12px; font-weight: 700; color: var(--ink); max-width: 420px; }
.ticket-meta { font-size: 10px; color: var(--muted); gap: 6px; margin-top: 3px; }
.ticket-meta .mono { font-size: 10px; color: #46405e; font-weight: 600; }
.source-icon { color: var(--muted); margin-left: 0; }

.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #46405e;
    background: #f7f5fc;
    transition: background 0.18s var(--ease-smooth), border-color 0.18s var(--ease-smooth), color 0.18s var(--ease-smooth);
}
.badge.status:before { width: 5px; height: 5px; }
.badge.new, .badge.open, .badge.scheduled { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
.badge.inprogress, .badge.pending, .badge.pendingapproval, .badge.submitted, .badge.implementing, .badge.investigating {
    color: #b45309;
    background: #fffbeb;
    border-color: #fde68a;
}
.badge.waitingoncustomer, .badge.identified, .badge.acknowledged {
    color: #6d28d9;
    background: #f5f3ff;
    border-color: #ddd6fe;
}
.badge.resolved, .badge.closed, .badge.approved, .badge.complete, .badge.completed, .badge.succeeded, .badge.sent, .badge.delivered {
    color: #047857;
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.badge.breached, .badge.failed, .badge.rejected, .badge.error {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}
.badge.priority { border: 0; background: transparent; font-size: 12px; color: #46405e; padding: 0; border-radius: 0; }
.badge.priority:before { width: 5px; height: 12px; border-radius: 999px; box-shadow: none; margin-right: 3px; }
.badge.priority.critical { color: #dc2626; font-weight: 700; }
.badge.priority.high { color: #d97706; font-weight: 700; }
.badge.priority.normal { color: #5b21b6; }
.badge.priority.normal:before { background: #7c3aed; }
.badge.priority.low:before { background: #9c96b8; }

.person { gap: 8px; color: #1e1933; font-size: 12px; font-weight: 600; }
.small-avatar { width: 25px; height: 25px; font-size: 10px; }

.sla {
    color: #46405e;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: #f7f5fc;
    transition: background 0.18s var(--ease-smooth), border-color 0.18s var(--ease-smooth), color 0.18s var(--ease-smooth);
}
.sla.met { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.sla.soon { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.sla.late { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

/* Queue Controls, Dropdowns, Notices & Cards */
.queue-tabs { border-color: var(--line); }
.queue-tabs > button { font-size: 12px; color: var(--muted); }
.queue-tabs button span { background: var(--royal-tint); color: var(--royal-deep); }
.search-input { border-color: #cfcbe3; color: #8b84a8; border-radius: 9px; }
.search-input input, .filter-bar .select-trigger, .filter-bar select { font-size: 12px; }
.table-footer { color: var(--muted); font-size: 11px; border-color: var(--line); }

.select-trigger, .select-option { color: #2d2844; }
.select-chevron, .select-search { color: var(--muted); }
.select-menu {
    border-color: #d5d0e8;
    border-radius: 11px;
    box-shadow: 0 14px 36px rgba(27, 16, 61, 0.14), 0 2px 6px rgba(15, 13, 28, 0.05);
    animation: menuReveal 0.18s var(--ease-spring);
}
.select-search, .select-hint { border-color: var(--line); }
.select-hint { background: #f7f5fc; color: var(--muted); font-size: 10px; }
.select-option:hover, .select-option.highlighted { background: var(--royal-soft); color: var(--royal-deep); }
.select-empty { color: var(--muted); }

.notice {
    border-radius: 10px;
    animation: noticeSlideIn 0.26s var(--ease-spring);
}
.notice.info { background: var(--royal-soft); border-color: var(--royal-border); color: var(--royal-deep); }
.notice.success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.notice.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.ai-icon, .plugin-icon { background: var(--royal-tint); color: var(--royal-deep); }
.problem-card, .plugin-card {
    transition: transform 0.26s var(--ease-spring), box-shadow 0.26s var(--ease-smooth), border-color 0.26s var(--ease-smooth);
}
.problem-card:hover, .plugin-card:hover {
    transform: translateY(-3px);
    border-color: #c4b5fd;
    box-shadow: var(--royal-shadow-hover);
}
.body-copy, .detail-list dd, .intake-summary dd, .chat-message p, .intake-conversation .chat-message p {
    color: #2d2844;
    font-size: 13px;
}
.field-hint, .detail-list dt, .detail-list dd small, .section-intro, .form-aside, .form-aside p,
.problem-card p, .plugin-card p, .card-meta, .chat-welcome p, .composer-bottom span,
.chat-message h3, .pagination-note, .status-line, .card-footer, .setting-toggle p {
    color: var(--muted);
}
.back-link, .form-aside h2 { color: var(--royal-deep); }
.data-table th {
    background: #f7f5fc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td { color: #46405e; border-color: #eeecf7; transition: background-color 0.16s var(--ease-smooth); }
.data-table tbody tr { transition: background-color 0.16s var(--ease-smooth); }
.data-table tbody tr:hover td { background: var(--royal-soft); }
.data-table td strong { color: var(--ink); }
.data-table td small { color: var(--muted); }
.reply-form, .quiet-box, .code-block { background: #f7f5fc; color: #46405e; }
.checkbox-label { color: #46405e; }
.chat-message.user { background: var(--royal-soft); border-color: var(--royal-border); }
.solution-card { background: #ecfdf5; border-color: #a7f3d0; }
.prompt-card {
    background: #ffffff;
    border-color: var(--line);
    color: #46405e;
    border-radius: 12px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(15, 13, 28, 0.03);
    transition: transform 0.24s var(--ease-spring), box-shadow 0.24s var(--ease-smooth), background 0.2s var(--ease-smooth), border-color 0.2s var(--ease-smooth);
}
.prompt-card:hover {
    background: var(--royal-soft);
    border-color: #c4b5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 33, 182, 0.10);
}
.prompt-card:active { transform: scale(0.985); }
.proposal { background: var(--royal-soft); border-color: var(--royal-border); }
.proposal h4 { color: var(--royal-deep); }
.proposal pre { color: #2d2844; }
.chat-composer { border-color: #cfcbe3; box-shadow: 0 4px 14px rgba(15, 13, 28, 0.04); }
.empty-state, .empty-state span { color: var(--muted); }
.empty-state strong { color: #2d2844; }
.app-footer { color: #847ea0; font-size: 10px; padding: 16px 32px 24px; }
.app-footer a { color: var(--royal); }

/* Executive Authentication & Animated Orbital Story Screen */
.login-story {
    background: radial-gradient(circle at 12% 14%, rgba(167, 139, 250, 0.28) 0%, transparent 48%),
                radial-gradient(circle at 88% 82%, rgba(124, 58, 237, 0.20) 0%, transparent 52%),
                linear-gradient(155deg, #f5f3ff 0%, #ede9fe 58%, #e4dcfe 100%);
    padding: 48px 12%;
}
.story-aurora {
    position: absolute;
    width: 440px;
    height: 440px;
    top: -140px;
    right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    pointer-events: none;
}
.login-story .brand { font-size: 24px; color: var(--ink); }
.login-story .eyebrow { color: var(--royal-deep); }
.login-story h1 { color: #190e36; font-weight: 800; }
.login-story em { color: var(--royal-vibrant); }
.login-story p { color: #4a416b; font-size: 14px; }
.login-story > small { color: #645b86; font-size: 11px; }

.login-decoration { width: 300px; height: 300px; bottom: -18px; right: -18px; }
.orbit {
    border-color: rgba(109, 40, 217, 0.22);
    animation: orbitRotate 36s linear infinite;
}
.orbit.two {
    border-color: rgba(124, 58, 237, 0.28);
    animation-duration: 26s;
    animation-direction: reverse;
}
.orbit.three {
    border-color: rgba(91, 33, 182, 0.36);
    animation-duration: 18s;
}
.orbit-node {
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #5b21b6);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.55);
}
.orbit.two .orbit-node {
    top: auto;
    bottom: -4px;
    width: 7px;
    height: 7px;
    background: #059669;
    box-shadow: 0 0 10px rgba(5, 150, 105, 0.5);
}
.orbit.three .orbit-node {
    width: 6px;
    height: 6px;
    background: #a78bfa;
}
.orbit-center {
    inset: 102px;
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(91, 33, 182, 0.34), 0 0 0 10px rgba(124, 58, 237, 0.12);
}
.floating-tag {
    color: var(--royal-deep);
    background: rgba(255, 255, 255, 0.94);
    border-color: #d4c8fe;
    box-shadow: 0 10px 26px rgba(91, 33, 182, 0.14);
    animation: floatTag 5.4s ease-in-out infinite;
    z-index: 3;
}
.floating-tag svg { color: #059669; }
.floating-tag.secondary {
    left: auto;
    right: 22px;
    top: 8px;
    font-size: 11px;
    padding: 8px 12px;
    transform: rotate(5deg);
    animation: floatTagAlt 6.2s ease-in-out infinite;
}
.floating-tag.secondary svg { color: var(--royal-vibrant); }

.login-form-wrap { background: var(--white); }
.login-form {
    max-width: 400px;
    animation: royalFadeUp 0.44s var(--ease-spring);
}
.login-form h2 { font-weight: 800; color: var(--ink); }
.login-form > p { font-size: 13px; }
.login-form label { font-size: 12px; color: #2d2844; }
.login-form input { font-size: 13px; border-radius: 10px; }
.login-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}
.demo-login {
    background: linear-gradient(145deg, #faf8ff 0%, #f3efff 100%);
    border-color: var(--royal-border);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(91, 33, 182, 0.05);
}
.demo-login strong { color: var(--royal-deep); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.demo-login p { color: var(--muted); font-size: 11px; line-height: 2.1; }
.demo-login code { color: var(--royal-deep); font-size: 11px; font-weight: 600; }

/* GPU-Accelerated Page & Component Entrance Animations */
main#main-content > *,
.panel,
.metric-card {
    animation: royalFadeUp 0.38s var(--ease-spring);
}
.metric-grid > *:nth-child(1) { animation-delay: 0.02s; animation-fill-mode: backwards; }
.metric-grid > *:nth-child(2) { animation-delay: 0.06s; animation-fill-mode: backwards; }
.metric-grid > *:nth-child(3) { animation-delay: 0.10s; animation-fill-mode: backwards; }
.metric-grid > *:nth-child(4) { animation-delay: 0.14s; animation-fill-mode: backwards; }

.prompt-grid > *:nth-child(1),
.list-card-grid > *:nth-child(1),
.report-metrics > *:nth-child(1) { animation: royalFadeUp 0.38s var(--ease-spring) 0.03s backwards; }
.prompt-grid > *:nth-child(2),
.list-card-grid > *:nth-child(2),
.report-metrics > *:nth-child(2) { animation: royalFadeUp 0.38s var(--ease-spring) 0.07s backwards; }
.prompt-grid > *:nth-child(3),
.list-card-grid > *:nth-child(3),
.report-metrics > *:nth-child(3) { animation: royalFadeUp 0.38s var(--ease-spring) 0.11s backwards; }
.list-card-grid > *:nth-child(4),
.report-metrics > *:nth-child(4) { animation: royalFadeUp 0.38s var(--ease-spring) 0.15s backwards; }
.list-card-grid > *:nth-child(5),
.report-metrics > *:nth-child(5) { animation: royalFadeUp 0.38s var(--ease-spring) 0.19s backwards; }
.list-card-grid > *:nth-child(6) { animation: royalFadeUp 0.38s var(--ease-spring) 0.23s backwards; }

@keyframes royalFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes barGrow {
    from {
        opacity: 0.25;
        transform: scaleY(0);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

@keyframes statusPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.75;
    }
    75%, 100% {
        transform: scale(2.15);
        opacity: 0;
    }
}

@keyframes shimmerSweep {
    0%, 72% {
        transform: translateX(-130%);
    }
    100% {
        transform: translateX(130%);
    }
}

@keyframes ringBreathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

@keyframes orbitRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatTag {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(-6deg);
    }
    50% {
        transform: translate3d(0, -8px, 0) rotate(-4deg);
    }
}

@keyframes floatTagAlt {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(5deg);
    }
    50% {
        transform: translate3d(0, -6px, 0) rotate(3deg);
    }
}

@keyframes menuReveal {
    from {
        opacity: 0;
        transform: translate3d(0, -6px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes noticeSlideIn {
    from {
        opacity: 0;
        transform: translate3d(0, -6px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Responsive Workspace Overrides */
@media (min-width: 1500px) {
    main#main-content { padding: 32px; }
    .topbar { padding: 0 32px; }
    .metric-card { padding: 20px; }
    .ticket-table td { padding-top: 14px; padding-bottom: 14px; }
    .bar-chart { height: 188px; }
}
@media (max-width: 1200px) {
    .metric-suffix { display: none; }
    .metric-card { padding: 16px; }
    .metric-note { font-size: 10px; min-height: 40px; }
    .overview-middle { grid-template-columns: 1.6fr 1fr; }
    .source-icon { display: flex; }
}
@media (max-width: 1000px) {
    .sidebar { width: 76px; padding: 20px 10px 0; }
    .sidebar .brand { font-size: 0; padding: 0; justify-content: center; gap: 0; }
    .sidebar .brand-name, .workspace-label, .nav-caption, .sidebar nav > a > .tiny-label, .assistant-mini, .profile > div { display: none; }
    .sidebar nav > a { font-size: 0; gap: 0; justify-content: center; padding: 13px 10px; }
    .sidebar nav > a:hover { transform: none; }
    .sidebar nav svg { width: 20px; height: 20px; }
    .sidebar-bottom { margin: auto 0 0; }
    .profile { flex-wrap: wrap; justify-content: center; }
    .profile > form { display: block; }
    .main-shell { margin-left: 76px; width: calc(100% - 76px); }
    .overview-middle { grid-template-columns: 1fr; }
    .insight-card { display: flex; }
    .insight-stat { margin-top: 20px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-suffix { display: inline; }
    .metric-note { min-height: 0; }
}
@media (max-width: 600px) {
    main#main-content { padding: 24px 16px; }
    .topbar { padding: 0 16px; }
    .breadcrumb { gap: 7px; }
    .page-heading { align-items: flex-start; gap: 16px; }
    .page-heading h1 { font-size: 25px; }
    .page-heading p { font-size: 12px; line-height: 1.7; }
    .eyebrow { font-size: 9px; letter-spacing: 1px; }
    .metric-grid { gap: 10px; }
    .metric-card { padding: 13px; border-radius: 12px; }
    .metric-label { font-size: 11px; }
    .metric-value { font-size: 28px; }
    .metric-suffix { display: none; }
    .metric-note { font-size: 10px; align-items: flex-start; line-height: 1.6; }
    .metric-note .dot { margin-top: 5px; }
    .panel-heading { padding: 18px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
    .panel-heading p { font-size: 11px; }
    .panel-heading .text-link { font-size: 11px; }
    .bar-chart { padding-left: 4px; padding-right: 4px; gap: 6%; margin-left: 18px; margin-right: 18px; }
    .day-label { font-size: 10px; }
    .insight-card { padding: 20px; }
    .queue-tabs > button { font-size: 11px; }
    .login-story { padding: 28px; }
    .login-story .brand { justify-content: flex-start; gap: 10px; }
    .login-story h1 { font-size: 35px; }
    .login-form-wrap { padding: 28px; }
    .login-form h2 { font-size: 29px; }
    .topbar-right .demo-badge { font-size: 10px; padding: 5px 8px; }
}

/* Accessibility First: Motion-Sensitive Preference Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    main#main-content > *,
    .panel,
    .metric-card,
    .prompt-grid > *,
    .list-card-grid > *,
    .report-metrics > *,
    .bar-chart .bar,
    .select-menu,
    .notice,
    .login-form,
    .orbit,
    .floating-tag,
    .floating-tag.secondary,
    .assistant-mini::after,
    .insight-card::before,
    .insight-card::after,
    .connection i:not(.offline)::after {
        animation: none !important;
    }

    .floating-tag { transform: rotate(-6deg) !important; }
    .floating-tag.secondary { transform: rotate(5deg) !important; }
    a.metric-card:hover,
    .button:hover:not(:disabled),
    .prompt-card:hover,
    .problem-card:hover,
    .plugin-card:hover,
    .assistant-mini:hover,
    .insight-card:hover,
    .sidebar nav > a:hover {
        transform: none !important;
    }
}
