:root {
    --brand-dark: #101524;
    --brand-dark-2: #151b2d;
    --brand-accent: #710296;
    --brand-accent-soft: rgba(113, 2, 150, 0.16);
    --brand-soft: #eef1f6;
    --panel-bg: #ffffff;
    --panel-border: #dde3ef;
    --ink: #1f2430;
    --ink-soft: #687387;
}

body {
    background: var(--brand-soft);
    color: var(--ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

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

.sidebar {
    width: 270px;
    min-height: 100vh;
    flex-shrink: 0;
}

.sidebar-panel {
    background: linear-gradient(180deg, #141b2d 0%, #0f1628 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
}

.sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.45rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.menu-group {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.menu-title {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.84);
    text-decoration: none;
    border-radius: 9px;
    padding: 0.55rem 0.75rem;
    font-size: 0.93rem;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(113, 2, 150, 0.75), rgba(113, 2, 150, 0.25));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.main-panel {
    min-width: 0;
    overflow-x: hidden;
}

.topbar {
    border-bottom: 1px solid #dce3ef;
    box-shadow: 0 2px 14px rgba(11, 19, 37, 0.05);
}

.card {
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(10, 18, 34, 0.06);
}

.card-stat {
    border: 1px solid #d7deeb;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(10, 18, 34, 0.05);
}

.table thead {
    background: #f5f7fc;
}

.badge-status {
    font-size: 0.75rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.2rem rgba(113, 2, 150, 0.2);
}

.btn-primary,
.btn-success {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
}

.btn-primary:hover,
.btn-success:hover {
    background-color: #540170;
    border-color: #540170;
}

.admin-shell .container-fluid > .card,
.admin-shell .container-fluid > .row > [class*="col-"] > .card {
    background: #fff;
}

.admin-shell .table {
    margin-bottom: 0;
}

.admin-shell .table th {
    font-size: 0.8rem;
    color: #5f6c83;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.admin-shell .table td {
    font-size: 0.9rem;
    color: #263047;
}

.admin-shell .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #fafbff;
}

.admin-shell .table-hover > tbody > tr:hover > * {
    background-color: #f1f4fb;
}

.admin-shell .card h6,
.admin-shell .card h5 {
    color: #1f2940;
    font-weight: 700;
}

.admin-shell .list-group-item {
    border-color: #e4e9f3;
}

.admin-shell .btn-outline-secondary {
    border-color: #cdd6e6;
    color: #42506b;
}

.admin-shell .btn-outline-secondary:hover {
    background: #f1f4fb;
    border-color: #bbc7db;
    color: #2d3b56;
}

.admin-shell .form-control,
.admin-shell .form-select {
    border-color: #d6deeb;
    min-height: 40px;
    border-radius: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 1rem;
}

.chart-card {
    padding: 1rem;
}

.chart-area {
    position: relative;
    height: 280px;
}

.chart-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-top: 0.65rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.4rem;
}

.availability-donut {
    width: 178px;
    height: 178px;
    border-radius: 50%;
    margin: 0 auto 0.95rem;
    display: grid;
    place-items: center;
    background: conic-gradient(#2f80ed var(--donut-value, 50%), #d5d9e2 var(--donut-value, 50%));
}

.availability-donut::after {
    content: "";
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
}

.availability-wrap {
    position: relative;
}

.availability-content {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    z-index: 1;
    font-weight: 700;
}

.data-table th,
.data-table td {
    font-size: 0.86rem;
    vertical-align: middle;
}

.empty-state {
    color: var(--ink-soft);
    text-align: center;
    padding: 1.4rem 0.65rem;
}

@media (max-width: 1199px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 18px 0 42px rgba(10, 15, 30, 0.4);
    }

    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(11, 15, 23, 0.45);
        z-index: 1090;
    }
}

.chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
}

.chat-toggle {
    border-radius: 999px;
    padding: 10px 18px;
}

.chat-window {
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 12px;
}

.chat-header {
    background: var(--brand-dark);
    color: #fff;
    padding: 10px 14px;
    font-weight: 600;
}

.chat-messages {
    height: 240px;
    overflow-y: auto;
    padding: 12px;
    background: #f8fafb;
}

.chat-message {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.chat-message.user {
    text-align: right;
}

.chat-message .bubble {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 12px;
    max-width: 85%;
}

.chat-message.user .bubble {
    background: #efd9f8;
}

.chat-message.bot .bubble {
    background: #e9eef3;
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eef1f4;
    background: #fff;
}
