body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
    max-width: 100%;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c6c6cd;
    border-radius: 999px;
}

.shadow-premium,
.premium-shadow,
.shadow-soft-premium {
    box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.05), 0 2px 4px -2px rgb(15 23 42 / 0.05);
}

.input-glow:focus,
.input-focus:focus {
    box-shadow: 0 0 0 2px rgb(15 23 42 / 0.12);
    border-color: #0f172a;
    outline: none;
}

.app-main {
    margin-left: 16rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 16rem);
}

.app-topbar {
    left: auto;
    width: 100%;
}

.app-content {
    padding: 1rem;
}

@media (min-width: 1024px) {
    .app-content {
        padding: 1.5rem;
    }
}

.app-sidebar .sidebar-link:not(.is-active),
.app-sidebar .sidebar-link:not(.is-active) .material-symbols-outlined {
    color: #f7f7f7 !important;
}

.app-sidebar .sidebar-link:not(.is-active):hover {
    background: rgb(255 255 255 / 0.12) !important;
}

.card {
    background: #fff;
    border: 1px solid rgb(198 198 205 / 0.35);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.05), 0 2px 4px -2px rgb(15 23 42 / 0.05);
}

.table-wrap {
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

.app-table th {
    background: #f7f9fb;
    color: #45464d;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 18px;
    border-bottom: 1px solid rgb(198 198 205 / 0.55);
}

.app-table td {
    padding: 13px 18px;
    border-bottom: 1px solid rgb(198 198 205 / 0.25);
    font-size: 14px;
    line-height: 20px;
}

.app-table tr:hover td {
    background: rgb(0 0 0 / 0.02);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(15 23 42 / 0.45);
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    max-height: 92vh;
    overflow-y: auto;
    width: min(980px, 100%);
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 24px 50px rgb(15 23 42 / 0.18);
}

.chart-grid-bg {
    background-image: linear-gradient(to right, #e5e7eb 1px, transparent 1px), linear-gradient(to bottom, #e5e7eb 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center bottom;
}

.wa-icon {
    color: #25d366;
}

.bg-gradient-golden {
    background: linear-gradient(135deg, rgb(255 247 237) 0%, rgb(248 250 252) 54%, rgb(239 246 255) 100%);
}

.auth-shell {
    min-height: 100dvh;
}

.auth-visual {
    padding: clamp(2rem, 5vw, 5rem);
}

.auth-preview {
    transform: translateY(1.25rem);
}

.auth-form-panel {
    min-height: 100dvh;
    padding: clamp(1.25rem, 4vw, 4.5rem);
}

.auth-form-panel > .w-full {
    margin-top: auto;
    margin-bottom: auto;
}

.login-card {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.auth-footer {
    margin-top: clamp(1.25rem, 4vh, 3rem);
    flex-shrink: 0;
}

.print-body {
    background: #f7f9fb;
    color: #191c1e;
    font-family: Inter, Arial, sans-serif;
    margin: 0;
}

.print-page {
    width: min(920px, calc(100% - 24px));
    margin: 24px auto;
    background: #fff;
    border: 1px solid #e0e3e5;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgb(15 23 42 / 0.05), 0 2px 4px -2px rgb(15 23 42 / 0.05);
    padding: 28px;
}

.thermal-page {
    width: 80mm;
    margin: 0 auto;
    background: #fff;
    padding: 10px;
    font-size: 11px;
}

.print-footer {
    border-top: 1px solid #e0e3e5;
    margin-top: 24px;
    padding-top: 12px;
    text-align: center;
    font-size: 12px;
}

@media (max-width: 1023px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        width: 100%;
        padding-top: 4rem;
    }

    .app-topbar {
        left: 0;
        width: 100%;
    }

    .app-content {
        padding: 0.875rem;
    }

    .pos-screen {
        height: auto;
        min-height: 100dvh;
        overflow: auto;
    }

    .pos-screen > main {
        overflow: visible;
    }

    .pos-screen section {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .app-main {
        padding-top: 3.75rem;
    }

    .app-topbar {
        min-height: 3.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .app-content {
        padding: 0.75rem;
    }

    .card {
        border-radius: 0.75rem;
    }

    .app-table th,
    .app-table td {
        padding: 10px 11px;
        font-size: 12px;
        line-height: 18px;
    }

    .modal {
        padding: 0;
        align-items: stretch;
    }

    .modal-panel {
        width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }

    .auth-form-panel {
        min-height: 100dvh;
        padding: 1rem;
    }

    .login-card {
        padding: 1.25rem;
        border-radius: 0.875rem;
    }

    .auth-footer {
        margin-top: 1rem;
        padding: 0.875rem 0.5rem;
    }

    .pos-screen header {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .pos-screen .product-card {
        min-width: 0;
    }

    .print-page {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        padding: 18px;
    }
}

@media print {
    body,
    .print-body {
        background: #fff;
    }

    .print-hide {
        display: none !important;
    }

    .print-page {
        width: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }

    .thermal-page {
        width: 58mm;
    }
}
