:root {
    --panel-sidebar: #111827;
    --panel-sidebar-hover: #1f2937;
    --panel-accent: #4f46e5;
    --panel-bg: #f4f6fb;
}

body {
    background: var(--panel-bg);
    font-size: .925rem;
}

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

.panel-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--panel-sidebar);
    color: #cbd5e1;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.panel-brand {
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .6rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.panel-brand i {
    color: #818cf8;
    font-size: 1.4rem;
}

.panel-nav {
    padding: 1rem .75rem;
    flex: 1;
    overflow-y: auto;
}

.panel-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .85rem;
    border-radius: .5rem;
    color: #cbd5e1;
    text-decoration: none;
    margin-bottom: .15rem;
}

.panel-nav a:hover {
    background: var(--panel-sidebar-hover);
    color: #fff;
}

.panel-nav a.active {
    background: var(--panel-accent);
    color: #fff;
}

.panel-nav i {
    font-size: 1.15rem;
}

.panel-nav .nav-count {
    margin-left: auto;
}

.panel-user {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
    font-size: .85rem;
}

.panel-main {
    flex: 1;
    min-width: 0;
}

.panel-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: .9rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.panel-topbar h1 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
}

.panel-content {
    padding: 1.5rem 1.75rem 3rem;
}

.card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.card-header {
    background: #fff;
    font-weight: 600;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: .75rem;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.table > :not(caption) > * > * {
    padding: .65rem .85rem;
}

.table thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    font-weight: 600;
    background: #f9fafb;
}

.revenue-chart {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
    height: 180px;
}

.revenue-chart .bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    gap: .35rem;
}

.revenue-chart .bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #818cf8, #4f46e5);
    border-radius: .35rem .35rem 0 0;
    min-height: 2px;
}

.revenue-chart .bar-label {
    font-size: .7rem;
    color: #6b7280;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.code-box {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: .5rem;
    padding: 1rem;
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.ticket-message {
    border-radius: .75rem;
    padding: .85rem 1rem;
    max-width: 85%;
}

.ticket-message.admin {
    background: #eef2ff;
    margin-left: auto;
}

.ticket-message.customer {
    background: #fff;
    border: 1px solid #e5e7eb;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #111827, #312e81);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

@media (max-width: 991.98px) {
    .panel-shell {
        flex-direction: column;
    }

    .panel-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .panel-nav {
        display: flex;
        flex-wrap: wrap;
        gap: .25rem;
    }
}
