* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
    --bg: #0f172a;
    --bg-soft: #111827;
    --card: #ffffff;
    --card-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --sidebar-text: #e5e7eb;
    --sidebar-muted: #94a3b8;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #eef2ff;
    color: var(--text);
}

a {
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: var(--sidebar-text);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform .25s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 18px;
}

.brand-text strong {
    display: block;
    color: #fff;
    font-size: 17px;
}

.brand-text span {
    display: block;
    color: var(--sidebar-muted);
    font-size: 13px;
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 14px;
    color: var(--sidebar-text);
    transition: .2s ease;
    font-size: 15px;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.mini-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mini-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mini-user strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.mini-user small {
    color: var(--sidebar-muted);
    font-size: 12px;
}

.logout-btn {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.14);
}

.main-area {
    margin-left: 270px;
    width: calc(100% - 270px);
    min-height: 100vh;
}

.topbar {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226,232,240,0.9);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.topbar-left p {
    color: var(--muted);
    font-size: 14px;
}

.topbar-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
}

.topbar-btn:hover {
    opacity: .95;
}

.menu-toggle {
    display: none;
    border: 0;
    background: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 6px 20px rgba(15,23,42,.08);
}

.content {
    padding: 28px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    border: 1px solid #edf2f7;
}

.stat-card .label {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.stat-card .value {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-card .meta {
    font-size: 13px;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}

.panel-card {
    background: var(--card);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    border: 1px solid #edf2f7;
}

.panel-card h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
}

.list-table th,
.list-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 14px;
}

.list-table th {
    color: var(--muted);
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.quick-actions {
    display: grid;
    gap: 12px;
}

.quick-action {
    display: block;
    padding: 16px;
    border-radius: 16px;
    background: var(--card-soft);
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 700;
}

.quick-action:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.welcome-box {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 16px 35px rgba(37,99,235,0.25);
}

.welcome-box h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.welcome-box p {
    max-width: 760px;
    line-height: 1.6;
    opacity: .95;
}

@media (max-width: 1100px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
        width: 100%;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 18px;
    }

    .content {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-right {
        width: 100%;
    }

    .topbar-btn {
        width: 100%;
        text-align: center;
    }

    .welcome-box h2 {
        font-size: 22px;
    }
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 6px;
}

.section-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: .2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.10);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    padding: 13px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: .2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff;
}

.btn-primary:hover {
    opacity: .95;
}

.btn-light {
    background: #eef2ff;
    color: #1e293b;
}

.btn-light:hover {
    background: #e0e7ff;
}

.btn-dark {
    background: #0f172a;
    color: #fff;
}

.btn-dark:hover {
    opacity: .94;
}

.btn-light-border {
    background: #fff;
    color: #1e293b;
    border: 1px solid var(--line);
}

.btn-light-border:hover {
    background: #f8fafc;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.table-btn:hover {
    background: #dbeafe;
}

.table-btn.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.table-btn.danger:hover {
    background: #fecaca;
}

.cards-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid #c4b5fd;
    transform: translateY(-4px);
}

.pricing-card.current {
    border: 2px solid #93c5fd;
}

.pricing-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 800;
}

.pricing-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 10px;
}

.pricing-price span {
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
}

.pricing-desc {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 18px;
}

.pricing-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.pricing-list li {
    position: relative;
    padding-left: 18px;
    color: #1e293b;
}

.pricing-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: #2563eb;
    font-weight: 900;
}

.mt-24 {
    margin-top: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.summary-item {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
}

.summary-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.summary-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.status-active {
    color: #15803d;
}

@media (max-width: 980px) {
    .cards-grid-3 {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .col-6,
    .col-4 {
        grid-column: span 12;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .section-head {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}