:root {
    --app-bg: #f5f7fb;
    --panel-bg: #ffffff;
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-active: #ffffff;
    --sidebar-active-bg: rgba(255,255,255,0.08);
    --border-color: #e5e7eb;
    --text-main: #111827;
    --text-muted: #6b7280;
    --primary-soft: #eef2ff;
    --radius: 14px;
    --shadow-soft: 0 6px 24px rgba(15, 23, 42, 0.06);
}

html, body {
    background: var(--app-bg);
    color: var(--text-main);
    font-size: 14px;
}

body {
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.08), transparent 30%),
        var(--app-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 24px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.auth-brand-mark,
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    flex-shrink: 0;
}

.auth-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.auth-subtitle,
.brand-subtitle,
.page-subtitle,
.user-role,
.metric-label,
.table-meta {
    color: var(--text-muted);
    font-size: 0.82rem;
}

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

.app-sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 16px 14px;
    position: fixed;
    inset: 0 auto 0 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 4px 6px 12px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    color: var(--sidebar-text);
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 500;
    transition: 0.15s ease;
}

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

.sidebar-link.active {
    color: var(--sidebar-active);
    background: var(--sidebar-active-bg);
}

.app-main {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 16px 18px;
}

.app-topbar {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.page-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.content-card,
.metric-card,
.table-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.content-card {
    padding: 16px;
}

.metric-card {
    padding: 14px;
    height: 100%;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 6px;
}

.table-card {
    overflow: hidden;
}

.table-card-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
}

.section-title {
    font-size: 0.96rem;
    font-weight: 700;
    margin: 0;
}

.app-table {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.app-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom-width: 1px;
    background: #fcfcfd;
}

.app-table td,
.app-table th {
    vertical-align: middle;
    padding: 11px 14px;
}

.badge-soft {
    background: var(--primary-soft);
    color: #3730a3;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.76rem;
}

.form-label {
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    font-size: 0.9rem;
    padding: 0.56rem 0.72rem;
    border-radius: 10px;
}

.btn {
    font-size: 0.88rem;
    border-radius: 10px;
    padding: 0.52rem 0.8rem;
    font-weight: 600;
}

.app-footer {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0 2px;
}

.empty-state {
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 991.98px) {
    .app-sidebar {
        display: none;
    }

    .app-main {
        margin-left: 0;
        width: 100%;
        padding: 12px;
    }

    .app-topbar {
        padding: 10px 12px;
    }
}