* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    height: 100vh;
    background: #1e293b;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: 0.3s ease;
    z-index: 999;
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    background: #0f172a;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 5px;
}

.sidebar-logo p {
    color: #cbd5e1;
    font-size: 14px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin: 4px 0;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
    font-size: 15px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: #334155;
    border-left: 4px solid #38bdf8;
}

.logout-link {
    color: #fca5a5 !important;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 25px;
    min-height: 100vh;
}

/* Mobile Topbar */
.mobile-topbar {
    display: none;
    margin-bottom: 20px;
}

.menu-toggle {
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

/* Page Header */
.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    font-size: 30px;
    color: #1e293b;
    margin-bottom: 5px;
}

.page-header p {
    color: #64748b;
    font-size: 15px;
}

/* Form Card */
.form-card {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    max-width: 900px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Form Row */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Form Group */
.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3b82f6;
}

/* Form Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #334155;
}

.btn-secondary {
    background: #e2e8f0;
    color: #111827;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Table Card */
.table-card {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    overflow-x: auto;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.table-card thead {
    background: #1e293b;
}

.table-card thead th {
    color: #fff;
    text-align: left;
    padding: 14px 16px;
    font-size: 15px;
}

.table-card tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    vertical-align: middle;
}

.table-card tbody tr:hover {
    background: #f8fafc;
}

.no-data {
    text-align: center;
    color: #94a3b8;
    padding: 20px !important;
}

/* Action Buttons */
.btn-edit,
.btn-delete {
    display: inline-block;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-right: 6px;
    color: #fff;
    transition: 0.3s;
}

.btn-edit {
    background: #0f766e;
}

.btn-edit:hover {
    background: #115e59;
}

.btn-delete {
    background: #dc2626;
}

.btn-delete:hover {
    background: #b91c1c;
}

/* Dashboard Cards */
.cards,
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card h3 {
    font-size: 18px;
    color: #475569;
    margin-bottom: 10px;
}

.card p {
    font-size: 28px;
    font-weight: bold;
    color: #0f172a;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
    flex-wrap: wrap;
}

.logout-btn {
    text-decoration: none;
    background: #dc2626;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
}

.logout-btn:hover {
    background: #b91c1c;
}

/* Quick Actions */
.quick-actions,
.info-box {
    background: #fff;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.quick-actions h2,
.info-box h2 {
    margin-bottom: 15px;
    color: #1e293b;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.action-btn {
    display: inline-block;
    text-decoration: none;
    background: #1e293b;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
}

.action-btn:hover {
    background: #334155;
}

/* Responsive */
@media (max-width: 992px) {
    .cards,
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: -250px;
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .mobile-topbar {
        display: block;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .cards,
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-card,
    .table-card,
    .quick-actions,
    .info-box,
    .card {
        padding: 18px;
    }

    .btn-primary,
    .btn-secondary,
    .action-btn,
    .logout-btn {
        width: 100%;
        text-align: center;
    }
}
.mobile-header {
    display: none;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 14px 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        z-index: 1001;
    }

    .mobile-header-title {
        font-size: 16px;
        font-weight: 700;
        color: #1e293b;
        letter-spacing: 0.5px;
    }

    .menu-toggle {
        width: 42px;
        height: 42px;
        border: none;
        border-radius: 10px;
        background: #1e293b;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        background: #ffffff;
        border-radius: 2px;
    }

    .sidebar {
        left: -260px;
        transition: all 0.3s ease;
        z-index: 1002;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 1000;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 85px 15px 15px 15px;
    }

    .topbar {
        display: none;
    }
}