/* ===== RESET ===== */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f9;
    overflow-x: hidden;
}

/* ===== LAYOUT ===== */

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* collapse par sirf icon */

.sidebar.collapsed .menu-item .text {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
}
/* ===== SIDEBAR ===== */

.sidebar {
    width: 200px;
    flex: 0 0 200px; /* ⭐ HARD WIDTH FIX */
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: white;
    transition: width 0.25s ease, flex-basis 0.25s ease;
}

    /* ===== DESKTOP COLLAPSE (REAL FIX) ===== */

    .sidebar.collapsed {
        width: 50px !important;
        flex: 0 0 50px !important;
    }

        .sidebar.collapsed .menu-item {
            padding: 10px 8px;
        }

/* ===== BRAND ===== */

.brand {
    font-size: 22px;
    font-weight: bold;
    padding: 18px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ===== MENU ===== */

.menu {
    padding: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 6px;
    color: #e2e8f0;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
}
    .menu-item:hover {
        background: rgba(255,255,255,0.1);
        color: white;
    }

/* ===== MAIN ===== */

.main-area {
    flex: 1 1 auto;
    min-width: 0; /* ⭐ FLEX OVERFLOW FIX */
    display: flex;
    flex-direction: column;
}

/* ===== TOPBAR ===== */

.topbar {
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.menu-toggle {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer; /* ⭐ pointer जरूरी */
    margin-right: 10px;
    color: darkgreen;
}

.title {
    font-weight: 700;
    font-size: 20px;
    color: #0f172a;
}

/* ===== CONTENT ===== */

.content {
    padding: 16px;
    width: 100%;
}

/* ===== CARD GRID ===== */

.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card-box {
    background: white;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

/* ===== MOBILE ===== */

@media (max-width: 768px) {

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        width: 250px !important;
        flex: none !important;
        z-index: 1000;
        transition: left 0.25s ease;
    }

        .sidebar.show {
            left: 0;
        }

        /* mobile me slim disable */

        .sidebar.collapsed {
            width: 250px !important;
            flex: none !important;
        }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 900;
    }

    .content {
        padding: 12px;
    }

    .card-box {
        padding: 14px;
    }

    .btn-sm {
        margin-bottom: 4px;
    }

    .qb-table td {
        min-width: 120px;
    }
}

/* ===== TABLE SAFE ===== */

.table-responsive {
    overflow-x: auto;
}

/* ===== BUTTON CLEAN ===== */

.btn-clean {
    border-radius: 8px;
    padding: 8px 14px;
}

/* ===== TEXT HELPERS ===== */

.page-title {
    margin-bottom: 16px;
    font-weight: 600;
}

.card-title {
    font-size: 14px;
    color: #64748b;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 6px;
    color: #0f172a;
}

.card-sub {
    font-size: 12px;
    color: #94a3b8;
}

textarea.form-control {
    resize: none;
}

.table th {
    font-size: 13px;
}

.table td {
    font-size: 14px;
}

/* ===== DASHBOARD ===== */

.page-title {
    margin-bottom: 16px;
    font-weight: 600;
}

/* cards */

.card-title {
    font-size: 14px;
    color: #64748b;
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 6px;
    color: #0f172a;
}

.card-sub {
    font-size: 12px;
    color: #94a3b8;
}

/* activity */

.activity-list {
    margin-top: 10px;
}

.activity-item {
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.time {
    color: #94a3b8;
    font-size: 12px;
}
/* ===== PAPER GENERATOR ===== */

.preview-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 20px;
    border-radius: 10px;
    color: #64748b;
    font-size: 14px;
    min-height: 120px;
}

/* form spacing fix */

.form-label {
    font-weight: 600;
    font-size: 13px;
}

/* mobile spacing */

@media (max-width: 768px) {
    .card-box {
        padding: 14px;
    }
}
/* ===== ONLINE TESTS ===== */

.test-card {
    transition: 0.2s ease;
}

    .test-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    }

.test-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
}

.test-meta {
    font-size: 13px;
    color: #64748b;
}
/* ===== QUESTION BANK ===== */

.qb-table th {
    font-size: 13px;
    white-space: nowrap;
}

.qb-table td {
    font-size: 14px;
    vertical-align: middle;
}

/* mobile table padding */

@media (max-width: 768px) {
    .qb-table td {
        min-width: 120px;
    }
}
/* mock form spacing */

.card-box h5 {
    font-weight: 600;
}

/* better mobile buttons */

@media (max-width: 768px) {
    .btn-sm {
        margin-bottom: 4px;
    }
}
/* settings spacing */

textarea.form-control {
    resize: none;
}
/* reports table spacing */

.table th {
    font-size: 13px;
}

.table td {
    font-size: 14px;
}