:root {
    --brand-primary: #0d2847;
    --brand-primary-light: #1a3a6e;
    --brand-secondary: #2c5aa0;
    --brand-gold: #ffd700;
    --brand-gold-soft: rgba(255, 215, 0, 0.16);
    --brand-bg: #edf3fb;
    --brand-card: rgba(255, 255, 255, 0.96);
    --brand-border: #dbe5f1;
    --brand-text: #15304d;
    --brand-muted: #6b7f96;
    --brand-shadow: 0 18px 40px rgba(13, 40, 71, 0.12);
    --brand-shadow-lg: 0 26px 60px rgba(13, 40, 71, 0.18);
    --brand-radius: 18px;
    --brand-radius-sm: 12px;
}

body {
    background:
        radial-gradient(circle at top right, rgba(44, 90, 160, 0.18), transparent 28%),
        radial-gradient(circle at left bottom, rgba(255, 215, 0, 0.1), transparent 24%),
        linear-gradient(180deg, #f4f8fd 0%, #edf3fb 100%);
    color: var(--brand-text);
}

.layout {
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #0b223e 0%, #0d2847 42%, #163e6b 100%);
    box-shadow: 12px 0 30px rgba(8, 24, 45, 0.18);
}

.brand-card,
.auth-brand,
.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.97);
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.brand-card {
    margin-bottom: 18px;
}

.brand-logo,
.auth-brand-logo,
.hero-brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-meta,
.auth-brand-meta,
.hero-brand-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.brand-meta strong,
.auth-brand-meta strong,
.hero-brand-meta strong {
    color: var(--brand-primary);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-meta span,
.auth-brand-meta span,
.hero-brand-meta span {
    color: #5d7390;
    font-size: 12px;
    letter-spacing: 0.6px;
}

.sidebar p#welcomeText,
.sidebar p.sidebar-note,
.sidebar p {
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 14px;
    line-height: 1.7;
}

.menu {
    gap: 10px;
}

.menu a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.88);
    transition: all 0.22s ease;
    border-left: 4px solid transparent;
}

.menu a:hover,
.menu a.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-left-color: var(--brand-gold);
    transform: translateX(2px);
}

.main {
    padding: 32px;
}

.topbar {
    margin-bottom: 22px;
    gap: 18px;
}

.topbar h2,
.panel h3 {
    color: var(--brand-primary);
}

.topbar h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.topbar .muted,
.panel .muted,
.desc,
.tip,
.links {
    color: var(--brand-muted) !important;
}

.panel,
.card,
.auth-shell .panel,
.wrap,
.modal {
    background: var(--brand-card);
    border: 1px solid rgba(219, 229, 241, 0.92);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
}

.panel,
.card {
    padding: 26px;
}

.cards {
    gap: 20px;
    margin-bottom: 24px;
}

.cards .card {
    position: relative;
    overflow: hidden;
}

.cards .card::before,
.hero-panel::before,
.auth-shell .panel::before,
.wrap::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-gold), #ffc14d 50%, var(--brand-secondary));
}

.cards .label {
    color: var(--brand-muted);
    font-size: 13px;
    letter-spacing: 0.3px;
}

.cards .value {
    color: var(--brand-primary);
    font-size: 34px;
    font-weight: 800;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: 26px;
    background: linear-gradient(135deg, rgba(13, 40, 71, 0.98), rgba(22, 62, 107, 0.92));
    color: #fff;
    border-radius: 22px;
    box-shadow: var(--brand-shadow-lg);
}

.hero-panel h3,
.hero-panel p,
.hero-panel .hero-metric strong,
.hero-panel .hero-metric span {
    color: #fff;
}

.hero-panel .hero-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.hero-panel .hero-metric {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px 16px;
}

.hero-panel .hero-metric strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}

.hero-panel .hero-metric span {
    font-size: 13px;
    opacity: 0.86;
}

.section-header,
.section-title {
    margin-bottom: 18px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    background: #fff;
}

table {
    background: #fff;
}

th,
td {
    padding: 14px 14px;
    border-bottom: 1px solid #eaf0f7;
}

th {
    background: linear-gradient(180deg, #f9fbfe 0%, #f0f5fb 100%);
    color: #516a86;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

tr:hover {
    background: #f8fbff;
}

.btn,
.ghost-btn,
.logout,
.topbar-notif,
.notif-btn,
.tab-btn {
    transition: all 0.22s ease;
}

.btn,
.logout {
    background: linear-gradient(135deg, var(--brand-gold), #f5c241);
    color: var(--brand-primary);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.22);
}

.btn:hover,
.logout:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(255, 215, 0, 0.3);
}

.ghost-btn,
.topbar-notif {
    border: 1px solid rgba(13, 40, 71, 0.18);
    background: #fff;
    color: var(--brand-primary);
}

.ghost-btn:hover,
.topbar-notif:hover {
    background: #f3f7fd;
}

.tab-bar,
.agent-tab-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 6px;
    background: #eef4fb;
    border-radius: 14px;
    width: fit-content;
    margin-bottom: 20px;
}

.tab-btn,
.agent-tab-bar a {
    border: none;
    background: transparent;
    padding: 9px 18px;
    border-radius: 10px;
    color: var(--brand-muted);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active,
.tab-btn:hover,
.agent-tab-bar a.active,
.agent-tab-bar a:hover {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 6px 18px rgba(13, 40, 71, 0.08);
}

.section-lead {
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.inline-highlight,
.tip-box,
.info-strip {
    background: linear-gradient(135deg, rgba(13, 40, 71, 0.05), rgba(255, 215, 0, 0.12));
    border: 1px solid rgba(255, 215, 0, 0.18);
    border-radius: 14px;
    padding: 16px 18px;
    color: #355270;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.quick-links a {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.quick-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 215, 0, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(44, 90, 160, 0.24), transparent 30%),
        linear-gradient(135deg, #071c34 0%, #0d2847 46%, #163e6b 100%);
}

.auth-shell .panel {
    position: relative;
    overflow: hidden;
    max-width: 520px;
    padding: 34px 32px;
}

.auth-shell h1 {
    color: var(--brand-primary);
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-shell .desc {
    margin-bottom: 22px;
    line-height: 1.75;
}

.entry-page {
    padding: 30px 16px;
}

.wrap {
    position: relative;
    overflow: hidden;
}

.entry-header {
    background: linear-gradient(135deg, rgba(13, 40, 71, 0.98), rgba(26, 58, 110, 0.92));
    color: #fff;
    padding: 28px 32px;
}

.entry-header h1,
.entry-header p {
    color: #fff;
}

.entry-header .hero-brand {
    margin-bottom: 18px;
}

.entry-content {
    padding: 30px 32px;
}

.entry-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.entry-step {
    background: #f4f8fd;
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    padding: 16px;
}

.entry-step strong {
    display: block;
    color: var(--brand-primary);
    margin-bottom: 6px;
}

.entry-step span {
    color: var(--brand-muted);
    font-size: 13px;
    line-height: 1.7;
}

.form-shell {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    padding: 20px;
}

label {
    color: var(--brand-text);
}

input,
select,
textarea {
    border: 1px solid #d4dfed;
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 4px rgba(44, 90, 160, 0.12);
}

.message {
    font-size: 13px;
}

.entry-footer-links,
.links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.entry-footer-links a,
.links a {
    color: var(--brand-primary);
    font-weight: 600;
}

.code-row {
    align-items: end;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.mini-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 8px 22px rgba(13, 40, 71, 0.06);
}

.mini-card strong {
    display: block;
    color: var(--brand-primary);
    font-size: 15px;
    margin-bottom: 6px;
}

.mini-card span {
    color: var(--brand-muted);
    font-size: 13px;
    line-height: 1.7;
}

.notif-panel {
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
}

.notif-item.unread {
    background: linear-gradient(135deg, rgba(44, 90, 160, 0.08), rgba(255, 215, 0, 0.08));
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-list ul {
    margin: 8px 0 0 18px;
}

@media (max-width: 1100px) {
    .main {
        padding: 22px;
    }

    .sidebar {
        box-shadow: none;
    }

    .hero-panel .hero-metric-grid,
    .mini-grid,
    .entry-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .brand-card,
    .auth-brand,
    .hero-brand {
        padding: 10px 12px;
    }

    .brand-logo,
    .auth-brand-logo,
    .hero-brand-logo {
        width: 46px;
        height: 46px;
    }

    .brand-meta strong,
    .auth-brand-meta strong,
    .hero-brand-meta strong {
        font-size: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar h2 {
        font-size: 24px;
    }

    .tab-bar,
    .agent-tab-bar,
    .quick-links,
    .entry-footer-links,
    .links {
        width: 100%;
    }

    .entry-content,
    .entry-header {
        padding: 22px;
    }
}
