* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e5e7eb;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f5f9 100%);
    color: var(--text);
}

a {
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0f172a 0%, #172554 100%);
    color: white;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 10px 0 30px rgba(2, 6, 23, 0.12);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 10px;
}

.brand-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    color: white;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.sidebar-brand h2 {
    font-size: 20px;
    margin-bottom: 2px;
}

.sidebar-brand p {
    color: #bfdbfe;
    font-size: 13px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a {
    color: #dbeafe;
    padding: 14px 16px;
    border-radius: 14px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.08);
    color: white;
    transform: translateX(3px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(96,165,250,0.22), rgba(37,99,235,0.35));
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer {
    margin-top: 24px;
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.08);
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.user-mini strong {
    display: block;
    font-size: 14px;
}

.user-mini span {
    font-size: 12px;
    color: #cbd5e1;
}

.main-wrapper {
    flex: 1;
    padding: 28px;
}

.main-wrapper.full-width {
    width: 100%;
    padding: 0;
}

.topbar {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: var(--shadow);
    border-radius: 24px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.topbar p {
    color: var(--muted);
    font-size: 14px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 14px;
    color: var(--muted);
    font-size: 13px;
}

.content-area {
    padding: 0;
}

.hero-card {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.22);
    margin-bottom: 24px;
}

.hero-card h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.hero-card p {
    color: rgba(255,255,255,0.88);
    max-width: 700px;
    line-height: 1.6;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: 2fr 1fr;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.85);
    box-shadow: var(--shadow);
    border-radius: 24px;
    padding: 24px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 18px;
}

.card-subtitle {
    color: var(--muted);
    margin-top: -10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
}

.stat-note {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.info-list {
    display: grid;
    gap: 14px;
}

.info-item {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.info-item strong {
    display: block;
    margin-bottom: 6px;
    color: #334155;
}

.info-item span {
    color: var(--muted);
    font-size: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 8px;
    vertical-align: top;
}

.data-table td:first-child {
    width: 180px;
    color: var(--muted);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.badge-danger {
    background: rgba(220, 38, 38, 0.12);
    color: var(--danger);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.2);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(37,99,235,0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff, #eef4ff);
}

.auth-left {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-left .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-left .brand-badge {
    width: 60px;
    height: 60px;
    border-radius: 18px;
}

.auth-left h1 {
    font-size: 44px;
    line-height: 1.15;
    margin-bottom: 16px;
    color: #0f172a;
}

.auth-left p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    max-width: 560px;
}

.auth-features {
    margin-top: 28px;
    display: grid;
    gap: 14px;
}

.auth-feature {
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: var(--shadow);
    border-radius: 18px;
    padding: 18px;
}

.auth-feature strong {
    display: block;
    margin-bottom: 6px;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
    border-radius: 30px;
    padding: 34px;
}

.auth-card h2 {
    font-size: 30px;
    margin-bottom: 8px;
}

.auth-card p {
    color: var(--muted);
    margin-bottom: 22px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    background: #fff;
    outline: none;
    transition: 0.2s ease;
    font-size: 15px;
}

.form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    background: rgba(220, 38, 38, 0.08);
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.alert-success {
    background: rgba(22, 163, 74, 0.08);
    color: #166534;
    border: 1px solid rgba(22, 163, 74, 0.15);
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .grid-2,
    .grid-3,
    .auth-page {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .app-shell {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-wrapper {
        padding: 16px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .auth-left,
    .auth-right {
        padding: 24px;
    }

    .auth-left h1 {
        font-size: 32px;
    }

    .hero-card h2 {
        font-size: 24px;
    }
}