/* ══════════════════════════════════════════════
   VASTRA – Global Styles
══════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue: #1565C0;
    --blue-light: #1976D2;
    --blue-bg: #E3F2FD;
    --green: #2E7D32;
    --green-bg: #E8F5E9;
    --orange: #E65100;
    --orange-bg: #FFF3E0;
    --purple: #6A1B9A;
    --purple-bg: #F3E5F5;
    --gray-1: #F5F7FA;
    --gray-2: #E9ECF0;
    --gray-3: #C5CDD8;
    --gray-4: #8A95A3;
    --gray-5: #4A525C;
    --text: #1A2332;
    --white: #FFFFFF;
    --radius: 14px;
    --shadow: 0 8px 32px rgba(21, 101, 192, .13);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .08);
    --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-1);
    color: var(--text);
    min-height: 100vh;
}

/* ══════════════════════════════════════════════
   AUTH
══════════════════════════════════════════════ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d47a1 0%, #1565C0 40%, #1976D2 70%, #42a5f5 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, .04);
    border-radius: 50%;
    bottom: -150px;
    left: -100px;
}

.auth-card {
    background: var(--white);
    border-radius: 24px;
    padding: 40px 36px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    display: none;
    animation: slideUp .4s ease;
    position: relative;
    z-index: 1;
}

.auth-card.active-card {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--blue), #42a5f5);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(21, 101, 192, .4);
}

.brand-name {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), #42a5f5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 3px;
}

.brand-sub {
    font-size: 12px;
    color: var(--gray-4);
    margin-top: 4px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.auth-desc {
    font-size: 14px;
    color: var(--gray-4);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-5);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--blue-light);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-2);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border var(--transition), box-shadow var(--transition);
    outline: none;
    background: var(--gray-1);
}

.form-group input:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, .12);
    background: var(--white);
}

.pass-wrap {
    position: relative;
}

.pass-wrap input {
    padding-right: 44px;
}

.eye-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-4);
    transition: color var(--transition);
}

.eye-btn:hover {
    color: var(--blue-light);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .3px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 6px 20px rgba(21, 101, 192, .35);
    margin-top: 6px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(21, 101, 192, .45);
}

.btn-primary:active {
    transform: translateY(0);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-4);
}

.auth-switch a {
    color: var(--blue-light);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-banner {
    background: #FFEBEE;
    border: 1px solid #EF9A9A;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #C62828;
    margin-bottom: 16px;
}

.success-banner {
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1B5E20;
    margin-bottom: 16px;
}

/* ══════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════ */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* NAV */
.top-nav {
    height: 62px;
    background: linear-gradient(90deg, var(--blue) 0%, var(--blue-light) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(21, 101, 192, .3);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hamburger {
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.hamburger:hover {
    background: rgba(255, 255, 255, .25);
}

.nav-brand {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
}

.nav-brand i {
    margin-right: 8px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #fff;
}

.btn-logout {
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, .28);
}

/* BODY */
.dashboard-body {
    display: flex;
    flex: 1;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: var(--white);
    border-right: 1px solid var(--gray-2);
    padding: 20px 0;
    transition: width var(--transition);
    min-height: calc(100vh - 62px);
    box-shadow: var(--shadow-sm);
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-5);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border-left: 3px solid transparent;
    margin-bottom: 2px;
}

.sidebar-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.sidebar-item:hover {
    background: var(--blue-bg);
    color: var(--blue-light);
    border-left-color: var(--blue-light);
}

.sidebar-item.active {
    background: var(--blue-bg);
    color: var(--blue);
    font-weight: 600;
    border-left-color: var(--blue);
}

/* MAIN */
.main-content {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-card.blue {
    border-left-color: var(--blue);
}

.stat-card.green {
    border-left-color: var(--green);
}

.stat-card.orange {
    border-left-color: var(--orange);
}

.stat-card.purple {
    border-left-color: var(--purple);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.blue .stat-icon {
    background: var(--blue-bg);
    color: var(--blue);
}

.green .stat-icon {
    background: var(--green-bg);
    color: var(--green);
}

.orange.stat-icon {
    background: var(--orange-bg);
    color: var(--orange);
}

.purple.stat-icon {
    background: var(--purple-bg);
    color: var(--purple);
}

.orange .stat-icon {
    background: var(--orange-bg);
    color: var(--orange);
}

.purple .stat-icon {
    background: var(--purple-bg);
    color: var(--purple);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-4);
    margin-top: 4px;
    font-weight: 500;
}

/* QUICK ACTIONS */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.section-header h3 i {
    margin-right: 8px;
    color: var(--blue-light);
}

.quick-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.qa-btn {
    background: var(--white);
    border: 1px solid var(--gray-2);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: transform var(--transition), box-shadow var(--transition);
    min-width: 110px;
    box-shadow: var(--shadow-sm);
}

.qa-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.qa-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
}

.blue-bg {
    background: linear-gradient(135deg, var(--blue), #42a5f5);
}

.green-bg {
    background: linear-gradient(135deg, var(--green), #66bb6a);
}

.orange-bg {
    background: linear-gradient(135deg, var(--orange), #ffa726);
}

.purple-bg {
    background: linear-gradient(135deg, var(--purple), #ab47bc);
}

.mt-32 {
    margin-top: 32px;
}

.btn-add {
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 4px 14px rgba(21, 101, 192, .3);
    transition: transform var(--transition);
}

.btn-add:hover {
    transform: translateY(-2px);
}

/* ══════════════════════════════════════════════
   DESIGNS CARD GRID
══════════════════════════════════════════════ */
.designs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    padding: 4px 0 16px;
}

.designs-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-4);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.designs-empty i {
    display: block;
    margin-bottom: 14px;
    color: var(--gray-3);
}

.designs-empty p {
    font-size: 14px;
    line-height: 1.7;
}

/* Individual Design Card */
.design-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
}

.design-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(21, 101, 192, .18);
}

/* Photo area */
.design-card-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #EDF4FB 0%, #D6E8F5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.design-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Edit overlay — appears on card hover */
.design-card-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(21, 101, 192, .88) 0%, transparent 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 20px 14px 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition);
    pointer-events: none;
}

.design-card:hover .design-card-edit-overlay {
    opacity: 1;
    transform: translateY(0);
}

.design-card-img .no-img-icon {
    font-size: 52px;
    color: #b0c4d8;
}

/* Price badge on image */
.design-price-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(21, 101, 192, .85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* Card footer: design name */
.design-card-footer {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--gray-2);
}

.design-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 3px;
}

.design-card-cat {
    font-size: 11px;
    color: var(--gray-4);
    font-weight: 500;
}

.design-card-desc {
    font-size: 11px;
    color: var(--gray-5);
    margin: 4px 0;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* Delete button on hover */
.design-card-del {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(198, 40, 40, .85);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    transition: background var(--transition);
}

.design-card:hover .design-card-del {
    display: flex;
}

.design-card-del:hover {
    background: rgba(198, 40, 40, 1);
}

/* Responsive */
@media (max-width: 1100px) {
    .designs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 820px) {
    .designs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .designs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ══════════════════════════════════════════════
   ADD DESIGN MODAL
══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-sheet {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 520px;
    max-height: 93vh;
    overflow-y: auto;
    animation: slideSheet .3s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideSheet {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--blue);
    color: #fff;
    padding: 16px 18px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-back {
    background: rgba(255, 255, 255, .15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.modal-back:hover {
    background: rgba(255, 255, 255, .25);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

/* Image Upload */
.img-upload-area {
    background: #EDF4FB;
    padding: 24px 18px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.img-preview {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    background: #D6E8F5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-actions {
    display: flex;
    gap: 12px;
}

.img-btn {
    width: 52px;
    height: 52px;
    background: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(21, 101, 192, .4);
    transition: transform var(--transition), box-shadow var(--transition);
}

.img-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(21, 101, 192, .5);
}

/* Form Fields */
.modal-form {
    padding: 10px 18px;
    flex: 1;
}

.form-field {
    margin-bottom: 4px;
}

.underline-field {
    border-bottom: 1.5px solid var(--gray-3);
    padding: 6px 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    transition: border-color var(--transition);
}

.underline-field:focus-within {
    border-color: var(--blue);
}

.field-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: var(--text);
    padding: 4px 0;
}

.field-input::placeholder {
    color: var(--gray-4);
}

.field-required {
    color: #e53935;
    margin-left: 4px;
    font-size: 16px;
}

/* Category */
.category-section {
    margin: 8px 0 14px;
}

.add-category-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px rgba(21, 101, 192, .3);
}

.add-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 101, 192, .4);
}

.cat-plus {
    background: rgba(255, 255, 255, .25);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.category-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-chip {
    background: var(--blue-bg);
    color: var(--blue);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-chip .remove {
    cursor: pointer;
    font-size: 11px;
    color: var(--gray-4);
}

.cat-chip .remove:hover {
    color: #e53935;
}

/* Accordion */
.accordion-section {
    border-top: 1px solid var(--gray-2);
    border-bottom: 1px solid var(--gray-2);
    margin: 12px 0;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    letter-spacing: .5px;
}

.accordion-header i {
    transition: transform var(--transition);
    color: var(--gray-4);
}

.accordion-header.open i {
    transform: rotate(90deg);
}

.accordion-body {
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.underline-field.half {
    flex: 1;
}

.toggle-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-2);
    gap: 12px;
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.toggle-info strong {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.toggle-info p {
    font-size: 12px;
    color: var(--gray-4);
    line-height: 1.4;
    margin-top: 2px;
}

.toggle-left-icon {
    width: 38px;
    height: 38px;
    background: var(--blue-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--blue);
    flex-shrink: 0;
}

.help-icon {
    color: var(--gray-4);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.help-icon-sm {
    color: var(--gray-4);
    font-size: 14px;
    margin-left: 6px;
}

.inline-input {
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    outline: none;
    width: 80px;
    font-size: 14px;
    padding: 3px 0;
    background: transparent;
    font-family: 'Inter', sans-serif;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-3);
    border-radius: 13px;
    cursor: pointer;
    transition: background var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--blue);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(20px);
}

/* Modal Footer */
.modal-footer {
    padding: 14px 18px 20px;
    background: var(--white);
    position: sticky;
    bottom: 0;
    border-top: 1px solid var(--gray-2);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}

.btn-save-design {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .8px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(21, 101, 192, .35);
    transition: transform var(--transition), box-shadow var(--transition);
}

.btn-save-design:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(21, 101, 192, .45);
}

/* ══════════════════════════════════════════════
   QR CODE + BARCODE SECTION
══════════════════════════════════════════════ */
.qr-barcode-section {
    background: var(--gray-1);
    border: 1.5px solid var(--gray-2);
    border-radius: 14px;
    padding: 16px;
    margin: 14px 0;
    animation: fadeIn .3s ease;
}

.qrb-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 14px;
}

.qrb-label i {
    margin-right: 6px;
}

.qrb-row {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
}

.qrb-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.qrb-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* QR code container */
#qrCodeBox {
    background: #fff;
    padding: 8px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrCodeBox canvas,
#qrCodeBox img {
    width: 110px !important;
    height: 110px !important;
}

/* Barcode canvas */
#barcodeCanvas {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-2);
    padding: 8px;
    max-width: 160px;
}

.qrb-divider {
    width: 1px;
    height: 130px;
    background: var(--gray-2);
    flex-shrink: 0;
}

.qrb-print-btn {
    width: 100%;
    margin-top: 14px;
    padding: 9px;
    background: var(--white);
    border: 1.5px solid var(--blue-light);
    color: var(--blue-light);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition), color var(--transition);
}

.qrb-print-btn:hover {
    background: var(--blue-light);
    color: #fff;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 680px) {
    .sidebar {
        display: none;
    }

    .sidebar.mobile-open {
        display: block;
        position: fixed;
        top: 62px;
        left: 0;
        bottom: 0;
        z-index: 99;
        width: 200px;
    }

    .main-content {
        padding: 18px 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .quick-actions {
        gap: 10px;
    }

    .auth-card {
        padding: 28px 22px;
    }
}

/* ══════════════════════════════════════════════
   PAGE SECTIONS
══════════════════════════════════════════════ */
.page-section {
    display: block;
}

/* ══════════════════════════════════════════════
   DELIVERY CHALLAN
══════════════════════════════════════════════ */
.challan-empty {
    text-align: center;
    padding: 80px 20px 120px;
    color: var(--gray-4);
}

.challan-empty p {
    font-size: 15px;
    margin-top: 16px;
}

.challan-empty strong {
    font-size: 16px;
    color: var(--text);
}

.challan-empty-icon {
    width: 110px;
    height: 110px;
    background: #DDEEFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 44px;
    color: #90B8D8;
}

.challan-empty-icon.sm {
    width: 80px;
    height: 80px;
    font-size: 32px;
    margin: 20px auto;
}

/* FAB */
.challan-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    border: none;
    border-radius: 32px;
    padding: 14px 26px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(21, 101, 192, .4);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform var(--transition), box-shadow var(--transition);
    z-index: 50;
}

.challan-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(21, 101, 192, .5);
}

.challan-fab.static {
    position: static;
    width: 100%;
    justify-content: center;
    border-radius: 14px;
}

.challan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Challan sheet taller */
.challan-sheet {
    max-height: 97vh;
}

/* Form inside challan modal */
.challan-form {
    padding: 0 18px;
    flex: 1;
    overflow-y: auto;
}

.challan-section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 14px 0 6px;
    border-bottom: 1px solid var(--gray-2);
    margin-bottom: 4px;
}

/* Row field (like Customer Name, Category) */
.challan-row-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-2);
    cursor: pointer;
    transition: background var(--transition);
}

.challan-row-field:hover {
    background: var(--blue-bg);
}

.challan-row-field i {
    color: var(--gray-3);
    font-size: 13px;
}

.challan-placeholder {
    font-size: 15px;
    color: var(--gray-4);
}

.challan-selected {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
}

/* Two-col inputs */
.challan-two-col {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-2);
}

.challan-input {
    flex: 1;
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    font-size: 14px;
    padding: 6px 0;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

.challan-input::placeholder {
    color: var(--gray-4);
}

.challan-input:focus {
    border-color: var(--blue);
}

/* Full-width input */
.challan-input-full {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    font-size: 14px;
    padding: 14px 0 8px;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    display: block;
}

.challan-input-full::placeholder {
    color: var(--gray-4);
}

.challan-input-full:focus {
    border-color: var(--blue);
}

.challan-input-full.required-field:focus {
    border-color: var(--blue);
}

/* Date row */
.challan-date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-2);
}

.challan-date-label {
    font-size: 11px;
    color: var(--gray-4);
    margin-bottom: 4px;
}

.challan-date-input {
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    font-family: 'Inter', sans-serif;
}

/* Toggle row in challan */
.challan-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-2);
    font-size: 14px;
    color: var(--text);
}

/* Textarea */
.challan-textarea {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    font-size: 14px;
    padding: 12px 0;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    resize: none;
    min-height: 50px;
}

.challan-textarea::placeholder {
    color: var(--gray-4);
}

/* Challan photo button */
.challan-photo-btn {
    display: inline-block;
    width: 72px;
    height: 72px;
    background: var(--gray-2);
    border-radius: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--gray-4);
    padding-top: 14px;
    cursor: pointer;
    border: 1.5px dashed var(--gray-3);
    margin: 10px 0;
    transition: border-color var(--transition);
    line-height: 1.5;
}

.challan-photo-btn:hover {
    border-color: var(--blue-light);
    color: var(--blue);
}

.challan-photo-btn i {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

/* DESIGN / MATERIAL tabs */
.challan-tabs {
    display: flex;
    border: 2px solid var(--blue-light);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0 0;
}

.challan-tab {
    flex: 1;
    padding: 11px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--blue-light);
    transition: background var(--transition), color var(--transition);
}

.challan-tab.active {
    background: var(--blue);
    color: #fff;
}

.challan-items-area {
    min-height: 100px;
    padding: 8px 0;
}

.challan-items-empty {
    text-align: center;
    padding: 20px 0;
}

/* Bottom bar */
.challan-bottom-bar {
    display: flex;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid var(--gray-2);
    background: var(--white);
    position: sticky;
    bottom: 56px;
}

.challan-add-item-btn {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(21, 101, 192, .3);
}

.challan-qr-btn,
.challan-scan-btn {
    width: 44px;
    height: 44px;
    background: #1A2332;
    color: #fff;
    border: none;
    border-radius: 28px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ══════════════════════════════════════════════
   CUSTOMER MODALS
══════════════════════════════════════════════ */
/* Customer list item */
.customer-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 10px;
    border-bottom: 1px solid var(--gray-2);
    cursor: pointer;
    border-radius: 10px;
    transition: background var(--transition);
}

.customer-item:hover {
    background: var(--blue-bg);
}

.customer-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue-bg);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.customer-avatar-sm img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-item-info strong {
    font-size: 14px;
    display: block;
}

.customer-item-info span {
    font-size: 12px;
    color: var(--gray-4);
}

/* Add Customer Avatar area */
.cust-avatar-area {
    background: #222;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cust-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--gray-3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cust-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cust-avatar-cam {
    position: absolute;
    bottom: 20px;
    left: calc(50% + 24px);
    width: 32px;
    height: 32px;
    background: var(--blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* GST row */
.cust-gst-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.cust-fetch-btn {
    white-space: nowrap;
    padding: 7px 14px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.cust-fetch-btn.blue {
    background: var(--blue-light);
}

/* ══════════════════════════════════════════════
   PICKER MODALS (State / City / Agent / Category)
══════════════════════════════════════════════ */
.picker-search-bar {
    padding: 10px 16px;
    background: var(--gray-1);
    border-bottom: 1px solid var(--gray-2);
    align-items: center;
}

.picker-search-bar input {
    border: none;
    outline: none;
    font-size: 15px;
    flex: 1;
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: var(--text);
}

/* Search icon button in modal header */
.picker-search-icon {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
}

/* Picker list rows */
.picker-list {
    display: flex;
    flex-direction: column;
}

.picker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray-2);
    cursor: pointer;
    font-size: 15px;
    transition: background var(--transition);
}

.picker-item:hover {
    background: var(--blue-bg);
}

.picker-item .picker-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--blue-bg);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.picker-item-info strong {
    display: block;
    font-size: 14px;
}

.picker-item-info span {
    font-size: 12px;
    color: var(--gray-4);
}

/* Picker empty state */
.picker-empty {
    text-align: center;
    padding: 60px 20px 20px;
}

.picker-add-btn {
    margin-top: 24px;
    padding: 14px 32px;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: transform var(--transition);
}

.picker-add-btn:hover {
    transform: translateY(-2px);
}

/* ADD MORE INFORMATION button */
.add-more-info-btn {
    width: 100%;
    margin: 16px 0;
    padding: 14px;
    background: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.add-more-info-btn:hover {
    background: var(--blue);
    color: #fff;
}

/* ══════════════════════════════════════════════
   ADD CATEGORY DIALOG
══════════════════════════════════════════════ */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dialog-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px 22px 0;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: fadeIn .25s ease;
}

.dialog-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 18px;
}

.dialog-input {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    font-size: 15px;
    padding: 10px 0;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    display: block;
    margin-bottom: 12px;
}

.dialog-input::placeholder {
    color: var(--gray-4);
}

.dialog-hint {
    font-size: 12px;
    color: var(--gray-4);
    margin: 8px 0 14px;
    line-height: 1.6;
}

.dialog-radio-row {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.dialog-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.dialog-radio input[type="radio"] {
    accent-color: var(--blue);
    width: 18px;
    height: 18px;
}

.dialog-two-col {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 8px;
}

.dialog-select {
    flex: 1;
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    font-size: 14px;
    padding: 8px 0;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

.dialog-actions {
    display: flex;
    margin: 0 -22px;
    border-top: 1px solid var(--gray-2);
    margin-top: 18px;
}

.dialog-cancel,
.dialog-save {
    flex: 1;
    padding: 16px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    transition: opacity .2s;
    font-family: 'Inter', sans-serif;
}

.dialog-cancel {
    background: #1A2332;
    color: #fff;
    border-radius: 0 0 0 16px;
}

.dialog-save {
    background: var(--blue);
    color: #fff;
    border-radius: 0 0 16px 0;
}

.dialog-cancel:hover,
.dialog-save:hover {
    opacity: .88;
}

/* ══════════════════════════════════════════════
   DESIGN PICKER (Add Item in Challan)
══════════════════════════════════════════════ */
.design-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.design-picker-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.design-picker-card:hover {
    border-color: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(21, 101, 192, .18);
}

.design-picker-card-img {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    background: var(--gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.design-picker-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-picker-card-img .no-img {
    font-size: 32px;
    color: #b0c4d8;
}

.design-picker-price {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--blue);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}

.design-picker-card-name {
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* QTY dialog design header */
.qty-dialog-design-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-2);
    margin-bottom: 8px;
}

.qty-dialog-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--gray-2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-dialog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qty-dialog-thumb i {
    font-size: 22px;
    color: #b0c4d8;
}

.qty-dialog-dname {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.qty-dialog-dprice {
    font-size: 13px;
    color: var(--blue-light);
    margin-top: 2px;
}

/* Added item row in challan */
.challan-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-2);
    animation: fadeIn .25s ease;
}

.challan-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.challan-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.challan-item-thumb i {
    font-size: 18px;
    color: #b0c4d8;
}

.challan-item-info {
    flex: 1;
    min-width: 0;
}

.challan-item-info strong {
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.challan-item-info span {
    font-size: 11px;
    color: var(--gray-4);
}

.challan-item-qty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--gray-4);
}

.challan-item-qty strong {
    font-size: 14px;
    color: var(--text);
}

.challan-item-del {
    background: none;
    border: none;
    color: #c62828;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
}

/* ══ Challan List Cards ══ */
.challan-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: box-shadow var(--transition), transform var(--transition);
    border-left: 4px solid var(--blue);
}

.challan-card:hover {
    box-shadow: 0 6px 20px rgba(21, 101, 192, .15);
    transform: translateY(-2px);
}

/* ══ Challan Detail View ══ */
.cd-meta-bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-1);
    border-bottom: 1px solid var(--gray-2);
}

.cd-meta-label {
    font-size: 11px;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.cd-meta-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-top: 2px;
}

.cd-totals-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid var(--gray-2);
    font-size: 13px;
}

.cd-item-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.cd-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.cd-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.cd-icon-btn.del {
    background: #FFEBEE;
    color: #c62828;
}

.cd-item-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 8px;
}

.cd-item-table th {
    background: var(--gray-1);
    padding: 6px 8px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.cd-item-table td {
    padding: 8px;
    border-bottom: 1px solid var(--gray-2);
}

.cd-table-input {
    width: 70px;
    border: none;
    border-bottom: 1.5px solid var(--blue);
    font-size: 13px;
    padding: 2px 4px;
    outline: none;
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: var(--text);
}

.cd-footer {
    display: flex;
    border-top: 2px solid var(--gray-2);
}

.cd-convert-btn,
.cd-update-btn {
    flex: 1;
    padding: 16px;
    border: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: opacity .2s;
}

.cd-convert-btn {
    background: #1A2332;
    color: #fff;
}

.cd-update-btn {
    background: var(--blue);
    color: #fff;
}

.cd-convert-btn:hover,
.cd-update-btn:hover {
    opacity: .88;
}

/* ══ Invoice Modal ══ */
.inv-bg {
    background: #F5F6FA;
}

.inv-section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-4);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 16px 0 8px;
}

.inv-card {
    background: #fff;
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.inv-row-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-2);
    cursor: pointer;
}

.inv-field-label {
    font-size: 11px;
    color: var(--gray-4);
    margin-bottom: 2px;
}

.inv-field-input {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--gray-3);
    font-size: 14px;
    padding: 6px 0;
    outline: none;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: transparent;
}

.inv-text-field {
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--gray-2);
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: transparent;
}

.inv-text-field::placeholder {
    color: var(--gray-4);
}

.inv-placeholder {
    color: var(--gray-4);
    font-size: 14px;
}

.inv-item-card {
    background: var(--gray-1);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.inv-item-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.inv-stat {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
}

.inv-stat-label {
    font-size: 10px;
    color: var(--gray-4);
    margin-bottom: 2px;
}

.inv-stat-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.inv-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.inv-tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-2);
}

.inv-tax-row:last-child {
    border-bottom: none;
}

.inv-mode-btn {
    flex: 1;
    padding: 9px;
    border: 2px solid var(--blue);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: var(--blue);
    background: transparent;
    font-family: 'Inter', sans-serif;
    transition: background .2s, color .2s;
}

.inv-mode-btn.active {
    background: var(--blue);
    color: #fff;
}

.inv-send-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 4px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}

.inv-send-msg input[type="checkbox"] {
    accent-color: var(--blue);
    width: 18px;
    height: 18px;
}

/* Hide arrows (spinners) from number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
    /* Firefox */
}

/* ----------------------------------------------
   PRINT STYLES
   ---------------------------------------------- */
@media print {
    body {
        margin: 0;
        padding: 0;
        background: #fff;
    }

    .top-nav,
    .sidebar,
    .section-header,
    .challan-fab {
        display: none !important;
    }

    .dashboard-body,
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        overflow: visible !important;
    }

    .page-section:not(#totalSellReportSection) {
        display: none !important;
    }

    #totalSellReportSection {
        display: block !important;
        padding: 0 !important;
        background: #fff !important;
    }

    #totalSellReportSection>div:first-child {
        display: none !important;
    }

    #totalSellReportSection>div:nth-child(2) {
        display: none !important;
    }

    #sellReportResults {
        padding: 0 !important;
        margin: 0 !important;
    }

    #sellReportResults>div:last-child {
        display: none !important;
    }

    button {
        display: none !important;
    }

    table {
        border: 1px solid #ddd !important;
        width: 100% !important;
    }
}

/* ══ Invoice Rate Input & Last Rate ══ */
.inv-field-input {
    border: 1px solid var(--gray-3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    font-family: 'Inter', sans-serif;
}

.inv-field-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.1);
}

.inv-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.inv-stat-label {
    font-size: 11px;
    color: var(--gray-4);
}

.inv-stat-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}