/* ============================================
   SALON MANAGER - Complete Styles
   ============================================ */

:root {
    --plum: #241623;
    --plum-light: #3a2438;
    --plum-lighter: #4c2f49;
    --rosegold: #c9899f;
    --rosegold-dark: #a86b81;
    --cream: #faf6f2;
    --card: #ffffff;
    --blush: #f4e5ea;
    --charcoal: #2c2528;
    --muted: #8a7a82;
    --border: #ece0e3;
    --success: #4c7a5c;
    --success-bg: #e8f2ec;
    --warning: #b8863b;
    --warning-bg: #faf1e2;
    --danger: #b4423f;
    --danger-bg: #faeae9;
    --shadow: 0 1px 2px rgba(36,22,35,0.06), 0 4px 16px rgba(36,22,35,0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.login-container {
    background: #fff;
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(36, 22, 35, 0.1);
}

.login-container .brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-container .brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--plum);
}

.login-container .brand p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 4px;
}

.login-container .error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.login-container .demo-cred {
    background: #f4f0ed;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    color: #6b5f64;
    margin-top: 20px;
    text-align: center;
}

.login-container .demo-cred strong {
    color: var(--plum);
}

/* ============================================
   APP SHELL
   ============================================ */
#app {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 236px;
    flex-shrink: 0;
    background: var(--plum);
    color: #f1e4e9;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .brand {
    padding: 26px 22px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar .brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar .brand-mark svg {
    flex-shrink: 0;
}

.sidebar .brand-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 19px;
    letter-spacing: 0.2px;
    color: #fff;
}

.sidebar .brand-sub {
    font-size: 10.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--rosegold);
    margin-top: 3px;
    font-weight: 600;
}

.sidebar .navlist {
    padding: 14px 12px;
    flex: 1;
    overflow-y: auto;
}

.sidebar .navlabel {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8f7a89;
    padding: 14px 10px 6px;
    font-weight: 600;
}

.sidebar .navitem {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    color: #e7d8de;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background .15s ease, color .15s ease;
    user-select: none;
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
}

.sidebar .navitem svg {
    opacity: .85;
    flex-shrink: 0;
}

.sidebar .navitem:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar .navitem.active {
    background: var(--rosegold);
    color: var(--plum);
    font-weight: 600;
}

.sidebar .navitem.active svg {
    opacity: 1;
}

.sidebar .sidebar-foot {
    padding: 14px 18px 18px;
    font-size: 11px;
    color: #8f7a89;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--cream);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar h1 {
    font-size: 23px;
    font-weight: 600;
    color: var(--plum);
    font-family: 'Playfair Display', serif;
}

.topbar .sub {
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 2px;
    font-family: 'Inter';
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .today-pill {
    font-size: 12px;
    color: var(--rosegold-dark);
    background: var(--blush);
    padding: 7px 13px;
    border-radius: 20px;
    font-weight: 600;
}

.content {
    padding: 26px 30px 50px;
    flex: 1;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-family: 'Inter';
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--plum);
    color: #fff;
}
.btn-primary:hover {
    background: var(--plum-light);
}

.btn-accent {
    background: var(--rosegold);
    color: var(--plum);
}
.btn-accent:hover {
    background: var(--rosegold-dark);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--plum);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--blush);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: #f0d3d1;
}
.btn-danger:hover {
    background: var(--danger-bg);
}

.btn-sm {
    padding: 6px 11px;
    font-size: 12px;
    border-radius: 7px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   CARDS & GRIDS
   ============================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card .lbl {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    font-weight: 600;
}

.stat-card .val {
    font-family: 'Playfair Display';
    font-size: 26px;
    font-weight: 700;
    color: var(--plum);
    margin-top: 8px;
}

.stat-card .sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 4px;
}

.stat-card.accent {
    border-color: var(--rosegold);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.card + .card {
    margin-top: 18px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.card-head h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--plum);
    font-family: 'Playfair Display', serif;
}

.card-head .desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.two-col {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 1100px) {
    .two-col {
        grid-template-columns: 1fr;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 60px;
    }
    .sidebar .brand-name,
    .sidebar .brand-sub,
    .sidebar .navitem span {
        display: none;
    }
    .sidebar .brand {
        padding: 16px;
    }
    .sidebar .navitem {
        justify-content: center;
        padding: 12px;
    }
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    text-align: left;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--muted);
    padding: 9px 12px;
    border-bottom: 1.5px solid var(--border);
    font-weight: 700;
    white-space: nowrap;
}

tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #fdf9fa;
}

.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.table-scroll {
    overflow-x: auto;
}

.empty-row {
    padding: 34px 10px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ============================================
   TAGS / BADGES
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.tag-paid {
    background: var(--success-bg);
    color: var(--success);
}

.tag-due {
    background: var(--danger-bg);
    color: var(--danger);
}

.tag-partial {
    background: var(--warning-bg);
    color: var(--warning);
}

.tag-neutral {
    background: var(--blush);
    color: var(--rosegold-dark);
}

.row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* ============================================
   FORMS
   ============================================ */
label {
    font-size: 12px;
    font-weight: 600;
    color: var(--plum);
    display: block;
    margin-bottom: 6px;
}

.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    font-family: 'Inter';
    font-size: 13.5px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.3px solid var(--border);
    background: #fff;
    color: var(--charcoal);
    outline: none;
    transition: border-color .15s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--rosegold);
    box-shadow: 0 0 0 3px rgba(201, 137, 159, 0.15);
}

input::placeholder {
    color: #b9acb2;
}

.field {
    margin-bottom: 14px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-row3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}

.search-wrap {
    position: relative;
}

.search-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: .45;
}

.search-wrap input {
    padding-left: 34px;
}

/* ============================================
   MODAL
   ============================================ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(36, 22, 35, 0.45);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    padding: 40px 16px;
    overflow-y: auto;
    backdrop-filter: blur(1px);
}

.overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(36, 22, 35, .25);
    animation: modalin .18s ease;
}

.modal.wide {
    max-width: 760px;
}

@keyframes modalin {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-head h3 {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--plum);
}

.modal-close {
    cursor: pointer;
    opacity: .5;
    padding: 4px;
    border-radius: 6px;
    border: none;
    background: none;
}

.modal-close:hover {
    opacity: 1;
    background: var(--blush);
}

.modal-body {
    padding: 22px 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-foot {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================
   TOAST
   ============================================ */
#toast {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--plum);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transition: all .25s ease;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 8px;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   INVOICE BUILDER
   ============================================ */
.service-picker {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.service-cat-label {
    background: var(--blush);
    color: var(--rosegold-dark);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.service-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.service-opt:hover {
    background: #fdf9fa;
}

.service-opt .price {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.service-opt .plus {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--blush);
    color: var(--rosegold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    margin-left: 10px;
}

.cart {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item .name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.cart-item .name small {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 11px;
}

.qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-ctrl button {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: var(--plum);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.qty-ctrl button:hover {
    background: var(--blush);
}

.qty-ctrl span {
    width: 18px;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
}

.cart-item .amt {
    width: 78px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}

.cart-item .rm {
    cursor: pointer;
    opacity: .4;
    padding: 4px;
    border: none;
    background: none;
}

.cart-item .rm:hover {
    opacity: 1;
    color: var(--danger);
}

.cart-empty {
    padding: 34px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.totals-box {
    border-top: 2px dashed var(--border);
    margin-top: 14px;
    padding-top: 14px;
}

.trow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 4px 0;
    color: var(--charcoal);
}

.trow.grand {
    font-size: 18px;
    font-weight: 700;
    color: var(--plum);
    font-family: 'Playfair Display';
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.trow input {
    width: 120px;
    text-align: right;
    padding: 5px 8px;
    font-size: 12.5px;
}

/* ============================================
   RECEIPT PREVIEW
   ============================================ */
.receipt-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.receipt {
    width: 300px;
    background: #fffdf9;
    font-family: 'Courier Prime', monospace;
    color: #2c2528;
    padding: 22px 18px 10px;
    box-shadow: 0 6px 24px rgba(36, 22, 35, .12);
    position: relative;
}

.receipt-zigzag {
    height: 11px;
    width: 300px;
    background-image:
        linear-gradient(135deg, #faf6f2 50%, transparent 50%),
        linear-gradient(-135deg, #faf6f2 50%, transparent 50%);
    background-size: 12px 22px;
    background-position: top left, top left;
    background-repeat: repeat-x;
    background-color: #fffdf9;
}

.receipt-zigzag.top {
    transform: rotate(180deg);
}

.receipt h4 {
    text-align: center;
    font-family: 'Playfair Display';
    font-size: 16px;
    letter-spacing: .5px;
}

.receipt .r-sub {
    text-align: center;
    font-size: 10.5px;
    color: #6b5f64;
    margin-top: 2px;
    line-height: 1.5;
}

.receipt .r-div {
    border-top: 1px dashed #c8bcc0;
    margin: 10px 0;
}

.receipt .r-line {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    margin: 3px 0;
}

.receipt .r-item {
    font-size: 11.5px;
    margin: 5px 0;
}

.receipt .r-item .top-l {
    display: flex;
    justify-content: space-between;
}

.receipt .r-item .meta {
    color: #8a7a82;
    font-size: 10.5px;
}

.receipt .r-total {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    margin-top: 4px;
}

.receipt .r-foot {
    text-align: center;
    font-size: 10.5px;
    margin-top: 12px;
    color: #6b5f64;
    line-height: 1.6;
}

/* ============================================
   MISC UTILITIES
   ============================================ */
.pill-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-filters .btn-ghost.active {
    background: var(--plum);
    color: #fff;
    border-color: var(--plum);
}

.muted {
    color: var(--muted);
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap8 {
    gap: 8px;
}
.gap12 {
    gap: 12px;
}

.mt8 {
    margin-top: 8px;
}
.mt14 {
    margin-top: 14px;
}
.mt18 {
    margin-top: 18px;
}

.w-full {
    width: 100%;
}

.center {
    text-align: center;
}

.customer-due-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--danger);
}

.swatch-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.swatch {
    padding: 9px 13px;
    border-radius: 8px;
    border: 1.3px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
}

.swatch.active {
    border-color: var(--rosegold);
    background: var(--blush);
    color: var(--rosegold-dark);
}

/* ============================================
   PRINT
   ============================================ */
#printArea {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    #printArea,
    #printArea * {
        visibility: visible;
    }
    #printArea {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    @page {
        margin: 0;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #ddc9d0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c9899f;
}

::-webkit-scrollbar-track {
    background: transparent;
}
/* ============================================
   FOOTER STYLES
   ============================================ */
.app-footer {
    background: var(--plum);
    color: #e7d8de;
    padding: 20px 30px 12px;
    margin-top: auto;
    border-top: 2px solid var(--rosegold);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    font-size: 20px;
    color: var(--rosegold);
}

.footer-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
}

.footer-version {
    font-size: 10px;
    background: rgba(201, 137, 159, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--rosegold);
    font-weight: 600;
}

.footer-copyright {
    font-size: 12px;
    color: #b09aa8;
}

.footer-copyright strong {
    color: var(--rosegold);
}

.footer-right {
    display: flex;
    align-items: center;
}

.footer-company {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.company-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    letter-spacing: 0.5px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #b09aa8;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.footer-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.footer-link svg {
    flex-shrink: 0;
}

.footer-link.whatsapp {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.15);
    background: rgba(37, 211, 102, 0.05);
}

.footer-link.whatsapp:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.3);
}

.footer-bottom {
    text-align: center;
    font-size: 11px;
    color: #8f7a89;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-bottom strong {
    color: var(--rosegold);
}

.footer-separator {
    color: #5a4a54;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .app-footer {
        padding: 16px 16px 10px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .footer-right {
        width: 100%;
    }
    
    .footer-company {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .company-name {
        width: 100%;
        margin-bottom: 2px;
    }
    
    .footer-link {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .footer-bottom {
        font-size: 10px;
        flex-direction: column;
        gap: 4px;
    }
    
    .footer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-brand {
        flex-wrap: wrap;
    }
    
    .footer-company {
        gap: 6px;
    }
    
    .footer-link {
        font-size: 10px;
        padding: 3px 6px;
    }
}
/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--rosegold);
    color: var(--plum);
    border: 2px solid var(--rosegold-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(201, 137, 159, 0.35);
    z-index: 999;
    padding: 0;
    outline: none;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--rosegold-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(201, 137, 159, 0.5);
}

.scroll-to-top:active {
    transform: scale(0.92);
}

.scroll-to-top svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

/* Scroll to Top - Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
    
    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
    
    .scroll-to-top svg {
        width: 16px;
        height: 16px;
    }
}
/* ============================================
   SESSION TIMER
   ============================================ */
.session-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    background: var(--blush);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.session-timer svg {
    flex-shrink: 0;
}

/* Status Tag Colors */
.tag-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.tag-danger {
    background: var(--danger-bg);
    color: var(--danger);
}
/* ============================================
   RESPONSIVE ADDITIONS - ADD THIS AT THE END
   ============================================ */

/* ============================================
   LARGE SCREENS (1200px and above)
   ============================================ */
@media (min-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .two-col {
        grid-template-columns: 1.3fr 1fr;
    }
    .field-row3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ============================================
   DESKTOP / LAPTOP (992px - 1199px)
   ============================================ */
@media (max-width: 1199px) and (min-width: 992px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .two-col {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   TABLET LANDSCAPE / SMALL LAPTOP (768px - 991px)
   ============================================ */
@media (max-width: 991px) {
    /* Sidebar */
    .sidebar {
        width: 60px;
    }
    .sidebar .brand {
        padding: 16px 10px;
    }
    .sidebar .brand-name,
    .sidebar .brand-sub,
    .sidebar .navitem span,
    .sidebar .navlabel {
        display: none;
    }
    .sidebar .brand-mark {
        justify-content: center;
    }
    .sidebar .navitem {
        justify-content: center;
        padding: 12px;
    }
    .sidebar .sidebar-foot {
        text-align: center;
        font-size: 8px;
        padding: 10px 4px;
    }
    .sidebar .sidebar-foot .tag {
        display: none;
    }
    
    .main {
        margin-left: 60px;
    }
    
    /* Grids */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .two-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .field-row3 {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Topbar */
    .topbar {
        padding: 14px 20px;
    }
    .topbar h1 {
        font-size: 20px;
    }
    .topbar .sub {
        font-size: 11px;
    }
    
    .content {
        padding: 20px;
    }
    
    /* Cards */
    .stat-card .val {
        font-size: 22px;
    }
    
    .card {
        padding: 18px;
    }
    .card-head h2 {
        font-size: 16px;
    }
    
    /* Buttons */
    .btn {
        font-size: 12px;
        padding: 8px 14px;
    }
    .btn-sm {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    /* Tables */
    table {
        font-size: 12px;
    }
    thead th {
        font-size: 9.5px;
        padding: 7px 10px;
    }
    tbody td {
        padding: 10px;
    }
    
    /* Footer */
    .app-footer {
        padding: 16px 20px 10px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .footer-right {
        width: 100%;
    }
    .footer-company {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .company-name {
        width: 100%;
        margin-bottom: 2px;
    }
    .footer-link {
        font-size: 11px;
        padding: 4px 8px;
    }
    .footer-bottom {
        font-size: 10px;
        flex-direction: column;
        gap: 4px;
    }
    .footer-separator {
        display: none;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
    .scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    /* Modal */
    .modal {
        max-width: 95%;
        margin: 0 10px;
    }
    .modal.wide {
        max-width: 95%;
    }
}

/* ============================================
   TABLET PORTRAIT / MOBILE LANDSCAPE (576px - 767px)
   ============================================ */
@media (max-width: 767px) {
    /* Sidebar */
    .sidebar {
        width: 60px;
    }
    .sidebar .brand {
        padding: 12px 8px;
    }
    .sidebar .brand-name,
    .sidebar .brand-sub,
    .sidebar .navitem span,
    .sidebar .navlabel {
        display: none;
    }
    .sidebar .brand-mark {
        justify-content: center;
    }
    .sidebar .brand-mark svg {
        width: 24px;
        height: 24px;
    }
    .sidebar .navitem {
        justify-content: center;
        padding: 10px;
    }
    .sidebar .navitem svg {
        width: 18px;
        height: 18px;
    }
    .sidebar .sidebar-foot {
        text-align: center;
        font-size: 7px;
        padding: 8px 4px;
    }
    .sidebar .sidebar-foot .tag {
        display: none;
    }
    
    .main {
        margin-left: 60px;
    }
    
    /* Topbar */
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .topbar h1 {
        font-size: 18px;
    }
    .topbar .sub {
        font-size: 10px;
    }
    .topbar-right {
        gap: 6px;
    }
    .topbar .today-pill {
        font-size: 10px;
        padding: 4px 10px;
    }
    
    .content {
        padding: 14px 16px;
    }
    
    /* Grids */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card .val {
        font-size: 20px;
    }
    .stat-card .lbl {
        font-size: 10px;
    }
    .stat-card .sub {
        font-size: 10px;
    }
    
    .two-col {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .field-row {
        grid-template-columns: 1fr;
    }
    .field-row3 {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Cards */
    .card {
        padding: 14px;
    }
    .card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .card-head h2 {
        font-size: 15px;
    }
    .card-head .desc {
        font-size: 11px;
    }
    
    /* Tables */
    .table-scroll {
        margin: 0 -14px;
        padding: 0 14px;
    }
    table {
        font-size: 11px;
    }
    thead th {
        font-size: 8.5px;
        padding: 6px 8px;
        letter-spacing: 0.5px;
    }
    tbody td {
        padding: 8px;
    }
    .row-actions {
        flex-direction: column;
        gap: 4px;
    }
    .row-actions .btn-sm {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    /* Buttons */
    .btn {
        font-size: 11px;
        padding: 6px 12px;
        gap: 4px;
    }
    .btn-sm {
        font-size: 10px;
        padding: 4px 8px;
    }
    .btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Forms */
    .form-control,
    input,
    select,
    textarea {
        font-size: 13px;
        padding: 8px 10px;
    }
    
    /* Modal */
    .modal {
        max-width: 100%;
        margin: 0 8px;
    }
    .modal-head {
        padding: 14px 16px;
    }
    .modal-head h3 {
        font-size: 15px;
    }
    .modal-body {
        padding: 16px;
    }
    .modal-foot {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .modal-foot .btn {
        flex: 1;
        justify-content: center;
    }
    
    /* Invoice Builder */
    .cart-item {
        flex-wrap: wrap;
        gap: 4px;
    }
    .cart-item .name {
        width: 100%;
        flex: none;
    }
    .cart-item .amt {
        width: auto;
        flex: 1;
    }
    .cart-item .qty-ctrl {
        gap: 4px;
    }
    .qty-ctrl button {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
    .trow.grand {
        font-size: 16px;
    }
    .trow input {
        width: 80px;
        font-size: 12px;
    }
    
    /* Service Picker */
    .service-opt {
        padding: 8px 10px;
        font-size: 12px;
    }
    .service-opt .plus {
        width: 20px;
        height: 20px;
        font-size: 13px;
    }
    
    /* Pill Filters */
    .pill-filters {
        gap: 6px;
    }
    .pill-filters .btn-sm {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    /* Footer */
    .app-footer {
        padding: 14px 16px 8px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-right {
        width: 100%;
    }
    .footer-company {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }
    .company-name {
        width: 100%;
        font-size: 12px;
        margin-bottom: 2px;
    }
    .footer-link {
        font-size: 10px;
        padding: 3px 6px;
    }
    .footer-bottom {
        font-size: 9px;
        flex-direction: column;
        gap: 3px;
    }
    .footer-separator {
        display: none;
    }
    .footer-brand .footer-name {
        font-size: 14px;
    }
    .footer-brand .footer-version {
        font-size: 8px;
        padding: 1px 6px;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
    .scroll-to-top svg {
        width: 16px;
        height: 16px;
    }
    
    /* Session Timer */
    .session-timer {
        font-size: 10px;
        padding: 4px 10px;
        gap: 4px;
    }
    .session-timer svg {
        width: 12px;
        height: 12px;
    }
    
    /* Toast */
    #toast {
        font-size: 12px;
        padding: 10px 16px;
        max-width: 90%;
        bottom: 16px;
    }
}

/* ============================================
   MOBILE PHONES (480px and below)
   ============================================ */
@media (max-width: 480px) {
    /* Topbar */
    .topbar {
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .topbar h1 {
        font-size: 16px;
    }
    .topbar .sub {
        font-size: 9px;
    }
    .topbar-right {
        gap: 4px;
    }
    .topbar .today-pill {
        font-size: 9px;
        padding: 3px 8px;
    }
    .topbar .btn-accent {
        font-size: 10px;
        padding: 4px 8px;
    }
    .topbar .btn-accent svg {
        width: 12px;
        height: 12px;
    }
    
    .content {
        padding: 10px 12px;
    }
    
    /* Grids */
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 12px 14px;
    }
    .stat-card .val {
        font-size: 18px;
    }
    .stat-card .lbl {
        font-size: 9px;
    }
    .stat-card .sub {
        font-size: 9px;
    }
    
    .two-col {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .field-row {
        grid-template-columns: 1fr;
    }
    .field-row3 {
        grid-template-columns: 1fr;
    }
    
    /* Cards */
    .card {
        padding: 12px;
        border-radius: 10px;
    }
    .card-head h2 {
        font-size: 14px;
    }
    .card-head .desc {
        font-size: 10px;
    }
    
    /* Tables */
    .table-scroll {
        margin: 0 -12px;
        padding: 0 12px;
    }
    table {
        font-size: 10px;
    }
    thead th {
        font-size: 7.5px;
        padding: 5px 6px;
        letter-spacing: 0.3px;
    }
    tbody td {
        padding: 6px;
    }
    .row-actions .btn-sm {
        font-size: 8px;
        padding: 2px 5px;
    }
    .tag {
        font-size: 9px;
        padding: 2px 6px;
    }
    
    /* Buttons */
    .btn {
        font-size: 10px;
        padding: 5px 10px;
        gap: 4px;
    }
    .btn-sm {
        font-size: 9px;
        padding: 3px 6px;
    }
    .btn svg {
        width: 12px;
        height: 12px;
    }
    
    /* Forms */
    label {
        font-size: 11px;
    }
    .form-control,
    input,
    select,
    textarea {
        font-size: 12px;
        padding: 6px 8px;
        border-radius: 6px;
    }
    .search-wrap input {
        padding-left: 28px;
    }
    .search-wrap svg {
        left: 8px;
        width: 14px;
        height: 14px;
    }
    
    /* Modal */
    .modal {
        max-width: 100%;
        margin: 0 4px;
        border-radius: 12px;
    }
    .modal-head {
        padding: 12px 14px;
    }
    .modal-head h3 {
        font-size: 14px;
    }
    .modal-body {
        padding: 14px;
    }
    .modal-foot {
        padding: 10px 14px;
        flex-direction: column;
    }
    .modal-foot .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Invoice Builder */
    .service-picker {
        max-height: 250px;
    }
    .service-opt {
        padding: 6px 8px;
        font-size: 11px;
    }
    .service-opt .plus {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    .cart-item {
        padding: 6px 8px;
        gap: 4px;
    }
    .cart-item .name {
        font-size: 11px;
    }
    .cart-item .name small {
        font-size: 9px;
    }
    .cart-item .amt {
        font-size: 11px;
        width: 60px;
    }
    .qty-ctrl button {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    .qty-ctrl span {
        width: 14px;
        font-size: 11px;
    }
    .trow {
        font-size: 11px;
    }
    .trow.grand {
        font-size: 14px;
    }
    .trow input {
        width: 70px;
        font-size: 11px;
    }
    .totals-box {
        margin-top: 10px;
        padding-top: 10px;
    }
    
    /* Receipt */
    .receipt {
        width: 100%;
        max-width: 300px;
        padding: 16px 14px 8px;
    }
    .receipt-zigzag {
        width: 100%;
        max-width: 300px;
    }
    
    /* Pill Filters */
    .pill-filters {
        gap: 4px;
    }
    .pill-filters .btn-sm {
        font-size: 9px;
        padding: 3px 6px;
    }
    .pill-filters input[type="date"] {
        font-size: 9px;
        padding: 3px 6px;
        max-width: 120px;
    }
    
    /* Footer */
    .app-footer {
        padding: 12px 12px 6px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .footer-right {
        width: 100%;
    }
    .footer-company {
        width: 100%;
        flex-wrap: wrap;
        gap: 4px;
    }
    .company-name {
        width: 100%;
        font-size: 11px;
    }
    .footer-link {
        font-size: 9px;
        padding: 2px 5px;
    }
    .footer-link svg {
        width: 10px;
        height: 10px;
    }
    .footer-bottom {
        font-size: 8px;
        flex-direction: column;
        gap: 2px;
    }
    .footer-copyright {
        font-size: 10px;
    }
    .footer-brand .footer-name {
        font-size: 12px;
    }
    .footer-brand .footer-version {
        font-size: 7px;
        padding: 1px 5px;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        bottom: 12px;
        right: 12px;
        width: 34px;
        height: 34px;
        border-width: 1.5px;
    }
    .scroll-to-top svg {
        width: 14px;
        height: 14px;
    }
    
    /* Session Timer */
    .session-timer {
        font-size: 9px;
        padding: 3px 8px;
        gap: 3px;
        border-radius: 16px;
    }
    .session-timer svg {
        width: 10px;
        height: 10px;
    }
    
    /* Toast */
    #toast {
        font-size: 11px;
        padding: 8px 14px;
        max-width: 95%;
        bottom: 12px;
        border-radius: 8px;
    }
    
    /* Login Page */
    .login-container {
        padding: 32px 24px;
        max-width: 100%;
        margin: 0 12px;
    }
    .login-container .brand h1 {
        font-size: 24px;
    }
    .login-container .brand p {
        font-size: 13px;
    }
    .login-container input {
        font-size: 13px;
        padding: 10px 12px;
    }
    .login-container .btn {
        font-size: 14px;
        padding: 12px;
    }
}

/* ============================================
   SIDEBAR TOGGLE BUTTON FOR MOBILE
   ============================================ */
.menu-toggle-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    background: var(--plum);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.menu-toggle-btn:hover {
    background: var(--plum-light);
}

.menu-toggle-btn:active {
    transform: scale(0.92);
}

/* Show menu toggle only on mobile */
@media (max-width: 480px) {
    .menu-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   ACCESSIBILITY - Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--rosegold);
    outline-offset: 2px;
}

/* ============================================
   END OF RESPONSIVE ADDITIONS
   ============================================ */
   /* ============================================
   RESPONSIVE FIXES - ADD AT THE END
   ============================================ */

/* Fix: Sidebar toggle for mobile */
.sidebar {
    transition: transform 0.3s ease;
}

/* Fix: Hide menu toggle button on desktop */
.menu-toggle-btn {
    display: none;
}

/* ============================================
   FIX: TABLES RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    .table-scroll table {
        min-width: 700px;
        font-size: 12px;
    }
    
    .table-scroll table th,
    .table-scroll table td {
        padding: 8px 10px;
        white-space: nowrap;
    }
}

/* ============================================
   FIX: CARD HEAD ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .card-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-head .pill-filters {
        width: 100%;
    }
    
    .card-head .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   FIX: STAT GRID ON MOBILE
   ============================================ */
@media (max-width: 576px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 14px 16px;
    }
    
    .stat-card .val {
        font-size: 20px;
    }
    
    .stat-card .lbl {
        font-size: 10px;
    }
    
    .stat-card .sub {
        font-size: 10px;
    }
}

/* ============================================
   FIX: FORMS ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .field-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .field-row3 {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .field-row3 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FIX: TOPBAR ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .topbar h1 {
        font-size: 18px;
    }
    
    .topbar .sub {
        font-size: 11px;
    }
    
    .topbar-right {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }
    
    .topbar .today-pill {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .session-timer {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .btn-accent {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .topbar h1 {
        font-size: 16px;
    }
    
    .topbar .sub {
        font-size: 10px;
    }
    
    .topbar .today-pill {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .session-timer {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .btn-accent {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .btn-accent svg {
        width: 12px;
        height: 12px;
    }
}

/* ============================================
   FIX: SIDEBAR ON MOBILE (Collapsible)
   ============================================ */
@media (max-width: 768px) {
    #app {
        position: relative;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease;
        box-shadow: 2px 0 20px rgba(0,0,0,0.2);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Show menu toggle button on mobile */
    .menu-toggle-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1001;
        background: var(--plum);
        color: #fff;
        border: none;
        border-radius: 8px;
        padding: 8px 10px;
        cursor: pointer;
        font-size: 20px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.2);
        transition: all 0.2s ease;
        width: 40px;
        height: 40px;
    }
    
    .menu-toggle-btn:hover {
        background: var(--plum-light);
    }
    
    .menu-toggle-btn:active {
        transform: scale(0.92);
    }
}

/* ============================================
   FIX: SIDEBAR ON TABLET (Collapsed)
   ============================================ */
@media (max-width: 992px) and (min-width: 769px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar .brand {
        padding: 16px 10px;
    }
    
    .sidebar .brand-name,
    .sidebar .brand-sub,
    .sidebar .navitem span,
    .sidebar .navlabel {
        display: none;
    }
    
    .sidebar .brand-mark {
        justify-content: center;
    }
    
    .sidebar .navitem {
        justify-content: center;
        padding: 12px;
    }
    
    .sidebar .navitem svg {
        width: 20px;
        height: 20px;
    }
    
    .sidebar .sidebar-foot {
        text-align: center;
        font-size: 8px;
        padding: 10px 4px;
    }
    
    .sidebar .sidebar-foot .tag {
        display: none;
    }
    
    .main {
        margin-left: 60px;
    }
}

/* ============================================
   FIX: PILL FILTERS ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .pill-filters {
        gap: 6px;
        width: 100%;
    }
    
    .pill-filters .btn-sm {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .pill-filters input[type="date"] {
        font-size: 11px;
        padding: 4px 8px;
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .pill-filters .btn-sm {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .pill-filters input[type="date"] {
        font-size: 10px;
        padding: 3px 6px;
        max-width: 120px;
    }
}

/* ============================================
   FIX: MODAL ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .modal {
        max-width: 95%;
        margin: 0 10px;
    }
    
    .modal-head {
        padding: 16px 18px;
    }
    
    .modal-head h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 18px;
    }
    
    .modal-foot {
        padding: 14px 18px;
        flex-wrap: wrap;
    }
    
    .modal-foot .btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal {
        max-width: 100%;
        margin: 0 8px;
        border-radius: 12px;
    }
    
    .modal-head {
        padding: 12px 14px;
    }
    
    .modal-head h3 {
        font-size: 15px;
    }
    
    .modal-body {
        padding: 14px;
    }
    
    .modal-foot {
        padding: 10px 14px;
        flex-direction: column;
    }
    
    .modal-foot .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   FIX: ROW ACTIONS ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .row-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .row-actions .btn-sm {
        font-size: 10px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .row-actions .btn-sm {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* ============================================
   FIX: TAGS ON MOBILE
   ============================================ */
@media (max-width: 480px) {
    .tag {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* ============================================
   FIX: TWO COLUMN LAYOUT
   ============================================ */
@media (max-width: 992px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ============================================
   FIX: RECEIPT ON MOBILE
   ============================================ */
@media (max-width: 480px) {
    .receipt {
        width: 100%;
        max-width: 300px;
        padding: 16px 14px 8px;
    }
    
    .receipt-zigzag {
        width: 100%;
        max-width: 300px;
    }
}

/* ============================================
   FIX: TOAST ON MOBILE
   ============================================ */
@media (max-width: 480px) {
    #toast {
        font-size: 12px;
        padding: 10px 16px;
        max-width: 92%;
        bottom: 16px;
        border-radius: 8px;
    }
}

/* ============================================
   FIX: SCROLL TO TOP ON MOBILE
   ============================================ */
@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }
    
    .scroll-to-top svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   FIX: FOOTER ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .footer-right {
        width: 100%;
    }
    
    .footer-company {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .company-name {
        width: 100%;
        font-size: 12px;
    }
    
    .footer-link {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 4px;
        font-size: 10px;
    }
    
    .footer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-link {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .footer-link svg {
        width: 10px;
        height: 10px;
    }
    
    .footer-brand .footer-name {
        font-size: 13px;
    }
    
    .footer-brand .footer-version {
        font-size: 8px;
        padding: 1px 5px;
    }
    
    .footer-copyright {
        font-size: 10px;
    }
}

/* ============================================
   FIX: LOGIN PAGE ON MOBILE
   ============================================ */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        max-width: 100%;
        margin: 0 12px;
    }
    
    .login-container .brand h1 {
        font-size: 24px;
    }
    
    .login-container .brand p {
        font-size: 13px;
    }
    
    .login-container input {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .login-container .btn {
        font-size: 14px;
        padding: 12px;
    }
}

/* ============================================
   FIX: INVOICE BUILDER ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .cart-item .name {
        width: 100%;
        flex: none;
    }
    
    .cart-item .amt {
        width: auto;
        flex: 1;
    }
    
    .qty-ctrl button {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .trow.grand {
        font-size: 17px;
    }
    
    .trow input {
        width: 80px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .service-opt {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .service-opt .plus {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }
    
    .service-picker {
        max-height: 250px;
    }
    
    .cart-item {
        padding: 6px 8px;
    }
    
    .cart-item .name {
        font-size: 12px;
    }
    
    .cart-item .name small {
        font-size: 9px;
    }
    
    .qty-ctrl button {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    .qty-ctrl span {
        width: 14px;
        font-size: 11px;
    }
    
    .trow {
        font-size: 12px;
    }
    
    .trow.grand {
        font-size: 15px;
    }
    
    .trow input {
        width: 60px;
        font-size: 11px;
    }
    
    .totals-box {
        margin-top: 10px;
        padding-top: 10px;
    }
}

/* ============================================
   FIX: SERVICE PICKER ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .service-cat-label {
        font-size: 10px;
        padding: 6px 10px;
    }
}

/* ============================================
   FIX: SWATCH ROW ON MOBILE
   ============================================ */
@media (max-width: 480px) {
    .swatch {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* ============================================
   FIX: CONTENT PADDING ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .content {
        padding: 16px 16px 30px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 10px 12px 20px;
    }
}

/* ============================================
   FIX: CARD PADDING ON MOBILE
   ============================================ */
@media (max-width: 768px) {
    .card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .card-head h2 {
        font-size: 15px;
    }
    
    .card-head .desc {
        font-size: 11px;
    }
}

/* ============================================
   FIX: STAT CARD ON TABLET
   ============================================ */
@media (max-width: 992px) and (min-width: 577px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ============================================
   FIX: STAT CARD ON VERY SMALL
   ============================================ */
@media (max-width: 400px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    
    .stat-card {
        padding: 10px 12px;
    }
    
    .stat-card .val {
        font-size: 16px;
    }
    
    .stat-card .lbl {
        font-size: 8px;
    }
    
    .stat-card .sub {
        font-size: 8px;
    }
}

/* ============================================
   FIX: SIDEBAR OVERLAY (Mobile background)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .sidebar-overlay.active {
        display: block;
    }
}

/* ============================================
   END OF RESPONSIVE FIXES
   ============================================ */