﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --bg: #f4f5f7;
    --sidebar: #0f1623;
    --sidebar-hover: #1a2236;
    --sidebar-active: #2563eb;
    --card: #ffffff;
    --text: #1a1f2e;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --accent: #7c3aed;
    --font: 'DM Sans',sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh
}

/* ── AUTH PAGES ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#0f1623 0%,#1e2d4a 50%,#0f1623 100%)
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    width: 420px;
    max-width: 95vw
}

.auth-logo {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: -0.5px;
    margin-bottom: 8px
}

    .auth-logo span {
        color: var(--accent)
    }

.auth-title {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 4px
}

.auth-sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 32px
}

.form-group {
    margin-bottom: 20px
}

    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 6px;
        color: #374151
    }

    .form-group input, .form-group select {
        width: 100%;
        padding: 10px 14px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-family: var(--font);
        font-size: 14px;
        outline: none;
        transition: border .2s;
        background: #fafafa;
        color: var(--text)
    }

        .form-group input:focus, .form-group select:focus {
            border-color: var(--primary);
            background: #fff
        }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%
}

    .btn-primary:hover {
        background: var(--primary-dark)
    }

.btn-danger {
    background: var(--danger);
    color: #fff
}

    .btn-danger:hover {
        background: #b91c1c
    }

.btn-success {
    background: var(--success);
    color: #fff
}

    .btn-success:hover {
        background: #15803d
    }

.btn-secondary {
    background: #f3f4f6;
    color: var(--text);
    border: 1.5px solid var(--border)
}

    .btn-secondary:hover {
        background: #e5e7eb
    }

.btn-sm {
    padding: 7px 14px;
    font-size: 13px
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--muted)
}

    .auth-footer a {
        color: var(--primary);
        cursor: pointer;
        font-weight: 500;
        text-decoration: none
    }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0
}

/* ── APP SHELL ── */
.shell {
    display: flex;
    min-height: 100vh
}

/* ── SIDEBAR ── */
.sidebar {
    width: 240px;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform .3s
}

.sidebar-brand {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06)
}

    .sidebar-brand .logo {
        font-size: 18px;
        font-weight: 600;
        color: #fff;
        letter-spacing: -0.3px
    }

        .sidebar-brand .logo span {
            color: #60a5fa
        }

    .sidebar-brand .sub {
        font-size: 11px;
        color: rgba(255,255,255,.35);
        margin-top: 2px;
        font-family: 'DM Mono',monospace;
        letter-spacing: .5px
    }

.nav-section {
    padding: 16px 12px 8px;
    font-size: 10px;
    color: rgba(255,255,255,.3);
    letter-spacing: 1px;
    font-weight: 500;
    text-transform: uppercase
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin: 1px 8px;
    border-radius: 8px;
    color: rgba(255,255,255,.6);
    font-size: 13.5px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap
}

    .nav-item:hover {
        background: var(--sidebar-hover);
        color: rgba(255,255,255,.9)
    }

    .nav-item.active {
        background: var(--primary);
        color: #fff
    }

    .nav-item .nav-icon {
        font-size: 17px;
        opacity: .8;
        width: 20px;
        text-align: center;
        flex-shrink: 0
    }

    .nav-item.active .nav-icon {
        opacity: 1
    }

.sidebar-footer {
    margin-top: auto;
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,.06)
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer
}

    .user-chip:hover {
        background: var(--sidebar-hover)
    }

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0
}

.user-info .name {
    font-size: 13px;
    color: #fff;
    font-weight: 500
}

.user-info .role {
    font-size: 11px;
    color: rgba(255,255,255,.4)
}

/* ── MAIN ── */
.main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50
}

.topbar-title {
    font-size: 17px;
    font-weight: 600
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.badge-notif {
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600
}

.page {
    padding: 28px
}

/* ── CARDS ── */
.card {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.card-title {
    font-size: 15px;
    font-weight: 600
}

.card-body {
    padding: 22px
}

/* ── STATS ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 16px;
    margin-bottom: 24px
}

.stat-card {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0
}

    .stat-icon.blue {
        background: #dbeafe;
        color: var(--primary)
    }

    .stat-icon.green {
        background: #dcfce7;
        color: var(--success)
    }

    .stat-icon.purple {
        background: #ede9fe;
        color: var(--accent)
    }

    .stat-icon.amber {
        background: #fef3c7;
        color: var(--warning)
    }

.stat-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px
}

/* ── TABLE ── */
.table-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse
}

thead th {
    background: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 1px solid var(--border)
}

tbody td {
    padding: 13px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle
}

tbody tr:hover {
    background: #fafbfc
}

tbody tr:last-child td {
    border-bottom: none
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500
}

    .status-badge.active {
        background: #dcfce7;
        color: #15803d
    }

    .status-badge.inactive {
        background: #fee2e2;
        color: #dc2626
    }

    .status-badge.pending {
        background: #fef3c7;
        color: #b45309
    }

.action-btns {
    display: flex;
    gap: 6px
}

/* ── SEARCH/FILTER BAR ── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px
}

    .search-box input {
        width: 100%;
        padding: 9px 14px 9px 38px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-family: var(--font);
        font-size: 13.5px;
        outline: none;
        transition: border .2s
    }

        .search-box input:focus {
            border-color: var(--primary)
        }

    .search-box .s-icon {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--muted);
        font-size: 15px
    }

/* ── FORM MODAL-STYLE ── */
.section-form {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 24px
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
    gap: 16px
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px
}

/* ── DASHBOARD GRID ── */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px
}

.activity-list {
    list-style: none
}

    .activity-list li {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 0;
        border-bottom: 1px solid #f3f4f6
    }

        .activity-list li:last-child {
            border-bottom: none
        }

.act-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0
}

    .act-dot.blue {
        background: var(--primary)
    }

    .act-dot.green {
        background: var(--success)
    }

    .act-dot.amber {
        background: var(--warning)
    }

.act-text {
    font-size: 13.5px;
    line-height: 1.5
}

.act-time {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px
}

.quick-list {
    list-style: none
}

    .quick-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 11px 0;
        border-bottom: 1px solid #f3f4f6;
        font-size: 13.5px
    }

        .quick-list li:last-child {
            border-bottom: none
        }

.quick-count {
    font-weight: 600;
    color: var(--primary)
}

/* ── PAGINATION ── */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    justify-content: flex-end
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    transition: all .2s;
    color: var(--text)
}

    .page-btn:hover, .page-btn.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary)
    }

/* ── PROFILE ── */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px
}

.avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    color: #fff
}

/* ── RESPONSIVE ── */
@media(max-width:768px){
    .sidebar{transform:translateX(-100%)}
    .main{margin-left:0}
    .dash-grid{grid-template-columns:1fr}
    .stats-grid{grid-template-columns:1fr 1fr}
}

/* Modal backdrop */
.modal-backdrop.fade { opacity: 0; transition: opacity 0.3s ease; }
.modal-backdrop.show { opacity: 0.5; }

/* Modal dialog */
.modal.fade .modal-dialog {
    transform: scale(0.85) translateY(-30px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.3s ease;
}
.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal content shadow */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* সব required field এর label এ auto * আসবে */
.required {
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    margin-left: 3px;
    cursor: help;
    vertical-align: middle;
}