
/* =====================================
   Maktaba Nomania Umarzai
   Inventory Dashboard - Main Styles
   ===================================== */

/* 1. Common settings */

* {
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --sidebar-bg: #ffffff;
    --page-bg: #f5f7fb;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --card-bg: #ffffff;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--page-bg);
    color: var(--text);
    font-size: 14px;
}

h1, h2, h3, h4, p {
    margin-top: 0;
}

/* 2. Main layout */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* 3. Left sidebar */

.sidebar {
    width: 245px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
}

.brand {
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.brand h1 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--primary);
}

.brand p {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 0;
}

.nav-heading {
    margin: 24px 8px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--muted);
}

.nav-link {
    display: block;
    text-decoration: none;
    color: var(--text);
    padding: 11px 12px;
    border-radius: 7px;
    margin-bottom: 4px;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

/* 4. Main workspace */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

.topbar h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.topbar p,
.section-heading p {
    color: var(--muted);
    margin-bottom: 0;
}

/* 5. Buttons */

button {
    font: inherit;
    cursor: pointer;
}

#add-book-button {
    border: 0;
    border-radius: 7px;
    padding: 11px 16px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

#add-book-button:hover {
    background: #1d4ed8;
}

/* 6. Dashboard statistics */

.dashboard-section {
    margin-bottom: 32px;
}

.dashboard-section h3,
.inventory-section h3 {
    font-size: 17px;
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    min-width: 0;
}

.stat-card p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 12px;
}

.stat-card h4 {
    font-size: 24px;
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

/* 7. Inventory search */

.section-heading {
    margin-bottom: 20px;
}

.section-heading h3 {
    margin-bottom: 7px;
}

.inventory-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

#book-search {
    width: 100%;
    max-width: 520px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    margin-bottom: 20px;
}

#book-search:focus {
    outline: 2px solid #bfdbfe;
    border-color: var(--primary);
}

/* 8. Compact book table */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9px;
}

table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

thead {
    background: #f8fafc;
}

th, td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

th {
    color: var(--muted);
    font-weight: 700;
}

td {
    color: var(--text);
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #f8fafc;
}

/* 9. Tablet and mobile layout */

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        width: 210px;
    }

    .main-content {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .brand {
        padding-bottom: 14px;
        margin-bottom: 12px;
    }

    .nav-heading {
        margin-top: 14px;
    }

    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .nav-heading {
        width: 100%;
    }

    .nav-link {
        padding: 9px 10px;
        font-size: 12px;
        margin-bottom: 0;
    }

    .main-content {
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 24px;
    }

    .topbar h2 {
        font-size: 21px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h4 {
        font-size: 20px;
    }
}

.clickable-book-row {
    cursor: pointer;
}

.clickable-book-row:hover {
    background-color: #f0f7f3;
}

.clickable-book-row:focus-visible {
    outline: 2px solid #198754;
    outline-offset: -2px;
}

.book-name-link {
    border: none;
    padding: 0;
    background: transparent;
    color: #167348;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.book-name-link:hover {
    text-decoration: underline;
}

.book-details-panel {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #dce5df;
    border-radius: 12px;
    background: #ffffff;
}

.book-details-panel[hidden] {
    display: none;
}

.book-details-panel h3 {
    display: inline-block;
    margin: 0 20px 16px 0;
}

.book-details-panel dl {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 2fr;
    gap: 12px;
    margin: 20px 0 0;
}

.book-details-panel dt {
    font-weight: 600;
    color: #53645a;
}

.book-details-panel dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .book-details-panel {
        padding: 14px;
    }

    .book-details-panel dl {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .book-details-panel dd {
        margin-bottom: 12px;
    }
}

#edit-book-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.edit-book-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.edit-book-field label {
    font-size: 14px;
    font-weight: 600;
}

.edit-book-field input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d5ded8;
    border-radius: 8px;
    font: inherit;
}

#edit-book-form button {
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 8px;
}

#edit-book-form [role="status"] {
    grid-column: 1 / -1;
    margin: 0;
}

@media (max-width: 600px) {
    #edit-book-form {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   PROFESSIONAL BOOK DETAILS PANEL
========================================= */

.book-details-panel {
    margin-top: 28px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8e4;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(20, 45, 32, 0.07);
    color: #1c2b23;
    animation: bookPanelAppear 180ms ease-out;
}

@keyframes bookPanelAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-details-panel[hidden] {
    display: none;
}

.book-details-panel h3 {
    display: inline-block;
    margin: 0 16px 22px 0;
    color: #173d2c;
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -0.4px;
    vertical-align: middle;
}

/* Common professional button styling */

.book-details-panel button,
#edit-book-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.book-details-panel button:focus-visible,
#edit-book-form button:focus-visible {
    outline: 3px solid rgba(25, 135, 84, 0.28);
    outline-offset: 3px;
}

.book-details-panel button:active,
#edit-book-form button:active {
    transform: translateY(1px);
}

.book-details-panel button:disabled,
#edit-book-form button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Close button */

#book-details-panel > button:nth-of-type(1) {
    float: right;
    min-height: 36px;
    padding: 8px 13px;
    background: #f3f5f4;
    color: #46574d;
    border-color: #e0e6e2;
}

#book-details-panel > button:nth-of-type(1):hover {
    background: #e8edea;
    border-color: #cbd7cf;
}

/* Book information layout */

.book-details-panel dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    margin: 0;
    padding: 8px 0 22px;
    clear: both;
}

.book-details-panel dt,
.book-details-panel dd {
    margin: 0;
    padding: 13px 14px;
    border-bottom: 1px solid #edf1ee;
    overflow-wrap: anywhere;
}

.book-details-panel dt {
    color: #66766c;
    font-size: 13px;
    font-weight: 600;
}

.book-details-panel dd {
    color: #253b2e;
    font-size: 14px;
    font-weight: 650;
}

/* Edit Book button */

#book-details-panel > button:nth-of-type(2) {
    margin: 0 10px 0 0 !important;
    background: #176b45;
    border-color: #176b45;
    color: #ffffff;
    box-shadow: 0 3px 7px rgba(23, 107, 69, 0.13);
}

#book-details-panel > button:nth-of-type(2):hover {
    background: #105638;
    border-color: #105638;
    box-shadow: 0 5px 12px rgba(23, 107, 69, 0.19);
}

/* Delete Book button */

#book-details-panel > button:nth-of-type(3) {
    margin: 0 !important;
    background: #ffffff;
    color: #bd3434;
    border-color: #e8baba;
}

#book-details-panel > button:nth-of-type(3):hover {
    background: #fff1f1;
    border-color: #d98c8c;
}

/* =========================================
   PROFESSIONAL EDIT BOOK FORM
========================================= */

#edit-book-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9eeeb;
}

.edit-book-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.edit-book-field label {
    color: #43564a;
    font-size: 13px;
    font-weight: 650;
}

.edit-book-field input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;
    background: #fbfcfb;
    color: #24372b;
    border: 1px solid #d8e1db;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.edit-book-field input:hover {
    border-color: #aabdb0;
}

.edit-book-field input:focus {
    background: #ffffff;
    border-color: #258458;
    box-shadow: 0 0 0 3px rgba(37, 132, 88, 0.12);
}

.edit-book-field input[readonly] {
    background: #f0f3f1;
    color: #647269;
    cursor: not-allowed;
}

#edit-book-form [role="status"] {
    grid-column: 1 / -1;
    margin: 0;
    color: #52665a;
    font-size: 13px;
}

/* Save Changes */

#edit-book-form button[type="submit"] {
    background: #176b45;
    border-color: #176b45;
    color: #ffffff;
}

#edit-book-form button[type="submit"]:hover {
    background: #105638;
    border-color: #105638;
}

/* Cancel */

#edit-book-form button[type="button"] {
    background: #f2f5f3;
    color: #43564a;
    border-color: #dce5df;
}

#edit-book-form button[type="button"]:hover {
    background: #e6ece8;
    border-color: #c7d5cc;
}

/* Responsive layout */

@media (max-width: 700px) {
    .book-details-panel {
        padding: 18px;
        border-radius: 12px;
    }

    .book-details-panel h3 {
        font-size: 20px;
    }

    .book-details-panel dl {
        grid-template-columns: 1fr;
        gap: 0;
    }

    #edit-book-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .book-details-panel button,
    #edit-book-form button {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-details-panel,
    .book-details-panel button,
    #edit-book-form button,
    .edit-book-field input {
        animation: none;
        transition: none;
    }
}

/* Book table action buttons */

.book-actions-cell {
    white-space: nowrap;
}

.book-actions-cell .action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin: 3px 4px 3px 0;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.book-actions-cell .action-view {
    color: #2457a6;
    background: #edf4ff;
    border-color: #d6e5ff;
}

.book-actions-cell .action-view:hover {
    background: #dceaff;
}

.book-actions-cell .action-edit {
    color: #176b45;
    background: #eaf6ef;
    border-color: #cce8d6;
}

.book-actions-cell .action-edit:hover {
    background: #d7efdf;
}

.book-actions-cell .action-delete {
    color: #b4232f;
    background: #fff0f0;
    border-color: #f2d0d0;
}

.book-actions-cell .action-delete:hover {
    background: #ffe0e0;
}

.book-actions-cell .action-button:focus-visible {
    outline: 2px solid #258458;
    outline-offset: 2px;
}

.book-actions-cell .action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .book-actions-cell .action-button {
        min-height: 38px;
        padding: 7px 9px;
    }
}

/* Keep the sidebar fixed while scrolling */

.app-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 100;
}

/* Keep the main content beside the fixed sidebar */

.main-content {
    margin-left: 260px;
    min-width: 0;
}

/* Responsive layout for smaller screens */

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Maktaba Nomania brand name - Green */

.sidebar .brand h1 {
    color: #16804a;
}

/* MAIN MENU and MANAGEMENT headings - Red */

.sidebar .nav-heading {
    color: #dc2626;
}

/* ===== Mobile fix: app.css ki 950px table width hatao ===== */

/* Manage table: screen ke andar fit ho */
.category-manage-table {
    min-width: 0;
    width: 100%;
    white-space: normal;
}

/* Books table: apne wrapper ke andar side scroll kare, page ko na phailaye */
.category-books-wrapper {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-books-table {
    min-width: 520px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .category-manage-table th,
    .category-manage-table td {
        padding: 10px 6px;
        font-size: 13px;
    }

    .category-manage-table td:first-child {
        overflow-wrap: anywhere;
    }

    .category-manage-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .category-manage-actions button {
        padding: 7px 10px;
        font-size: 12px;
    }
}
/* ===== Mobile bottom navigation + drawer ===== */

.bottom-nav,
.menu-toggle,
.mobile-drawer,
.drawer-overlay {
    display: none;
}

@media (max-width: 768px) {
    /* Purana upar wala menu chhupa do */
    .sidebar nav {
        display: none !important;
    }

    .sidebar .brand {
        margin-bottom: 8px;
        padding-bottom: 12px;
    }

    /* 3 lines wala button */
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #ffffff;
        color: var(--text);
    }

    .menu-toggle svg {
        width: 22px;
        height: 22px;
    }

    /* Neeche wali bar ke liye jagah */
    body {
        padding-bottom: 96px;
    }

    .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        display: flex;
        align-items: flex-end;
        justify-content: space-around;
        height: 70px;
        padding: 0 6px env(safe-area-inset-bottom);
        background: #ffffff;
        border-radius: 22px 22px 0 0;
        box-shadow: 0 -4px 18px rgba(20, 45, 32, 0.12);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 2px;
        color: #6b7a72;
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
    }

    .bottom-nav-icon svg {
        display: block;
        width: 24px;
        height: 24px;
    }

    .bottom-nav-item.active {
        color: #176b45;
    }

    /* Beech ka gol green button */
    .bottom-nav-center {
        position: relative;
        justify-content: flex-end;
        color: #176b45;
    }

    .bottom-nav-center .bottom-nav-icon {
        position: absolute;
        top: -26px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 62px;
        height: 62px;
        border: 4px solid #ffffff;
        border-radius: 50%;
        background: #176b45;
        color: #ffffff;
        box-shadow: 0 6px 14px rgba(23, 107, 69, 0.4);
    }

    .bottom-nav-center .bottom-nav-icon svg {
        width: 28px;
        height: 28px;
    }

    .bottom-nav-center .bottom-nav-label {
        padding-bottom: 6px;
    }

    /* Left side drawer */
    .drawer-overlay {
        position: fixed;
        inset: 0;
        z-index: 300;
        display: block;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .drawer-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 301;
        display: block;
        width: 270px;
        max-width: 80%;
        padding: 18px 14px;
        background: #ffffff;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .mobile-drawer.open {
        transform: translateX(0);
    }

    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
        padding-bottom: 14px;
        border-bottom: 1px solid var(--border);
        color: #16804a;
        font-size: 16px;
    }

    .drawer-close {
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 8px;
        background: #f1f4f2;
        color: var(--text);
    }

    .mobile-drawer a {
        display: block;
        margin-bottom: 4px;
        padding: 14px 12px;
        border-radius: 9px;
        color: var(--text);
        text-decoration: none;
        font-size: 15px;
        font-weight: 600;
    }

    .mobile-drawer a:hover {
        background: #e8f4ec;
        color: #176b45;
    }
}
/* ===== 3 lines wala button: brand ke saath, upar left ===== */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        padding-top: 16px;
    }

    .menu-toggle {
        position: absolute;
        top: 16px;
        left: 16px;
        z-index: 5;
    }

    .sidebar .brand {
        min-height: 42px;
        padding-left: 56px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .sidebar .brand h1 {
        margin-bottom: 4px;
        font-size: 17px;
    }
}
/* ===== Mobile header: bada brand, poori patti mein fit ===== */
@media (max-width: 768px) {
    .sidebar {
        padding: 14px 16px 10px;
    }

    .sidebar .brand {
        min-height: 64px;
        margin-bottom: 0;
        padding: 0 0 0 74px;
        border-bottom: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .sidebar .brand h1 {
        margin: 0 0 4px;
        font-size: 24px;
        font-weight: 800;
        letter-spacing: 0.3px;
        line-height: 1.15;
    }

    .sidebar .brand p {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        color: #64748b;
    }

    .menu-toggle {
        top: 14px;
        left: 16px;
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }

    .menu-toggle svg {
        width: 28px;
        height: 28px;
    }
}

/* Bohut chhote phones (360px se kam) */
@media (max-width: 360px) {
    .sidebar .brand h1 {
        font-size: 20px;
    }

    .sidebar .brand p {
        font-size: 12px;
    }
}
/* ===== Brand: naam aur Umarzai · Kamran Khan beech mein ===== */
@media (max-width: 768px) {
    .sidebar .brand {
        align-items: center;
        text-align: center;
        padding: 0 74px 0 74px;
    }

    .sidebar .brand h1,
    .sidebar .brand p {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .sidebar .brand {
        padding: 0 66px;
    }
}
/* ===== Brand: naam ek line mein, neeche Umarzai · Kamran Khan ===== */
@media (max-width: 768px) {
    .sidebar .brand {
        padding: 0 0 0 66px;
        align-items: center;
        text-align: center;
    }

    .sidebar .brand h1 {
        white-space: nowrap;
        font-size: 21px;
        letter-spacing: 0;
    }

    .sidebar .brand p {
        white-space: nowrap;
        font-size: 13px;
    }

    .menu-toggle {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 380px) {
    .sidebar .brand {
        padding-left: 62px;
    }

    .sidebar .brand h1 {
        font-size: 18px;
    }

    .sidebar .brand p {
        font-size: 12px;
    }
}
/* ===== Book name ka rang stock ke hisaab se ===== */
.book-name-link.stock-ok  { color: #167348 !important; }  /* green */
.book-name-link.stock-low { color: #b45309 !important; }  /* brown/amber */
.book-name-link.stock-out { color: #dc2626 !important; }  /* red */
/* ===== Mobile: brand + menu button always stay at the top ===== */

/* ===== Mobile: header (brand + menu button) always fixed at the top ===== */

@media (max-width: 768px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 900 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 10px rgba(16, 60, 40, 0.12);
    }

    /* header ki jagah khali chhodo, taake page uske neeche se shuru ho */
    body {
        padding-top: var(--mobile-header-h, 72px) !important;
    }

    html {
        scroll-padding-top: calc(var(--mobile-header-h, 72px) + 12px);
    }

    [id] {
        scroll-margin-top: calc(var(--mobile-header-h, 72px) + 12px);
    }
}