
/* ========================================
   ZAMCUBE POS - DESIGN SYSTEM
======================================== */

:root {
    --navy-950: #081329;
    --navy-900: #0b1730;
    --navy-800: #14264a;
    --navy-700: #1d3a68;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --white: #ffffff;
    --surface: #f5f7fb;
    --border: #dce4f0;
    --text-primary: #152442;
    --text-secondary: #667792;
    --danger: #dc2626;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-card: 0 12px 40px rgba(11, 23, 48, 0.08);
}
/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text-primary);
    background: var(--surface);
    line-height: 1.5;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}
/* ========================================
   LOGIN PAGE
======================================== */
.login-page {
    min-height: 100vh;
    background: var(--white);
}

.login-shell {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    min-height: 100vh;
}
/* Brand panel */
.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    color: var(--white);
    background: radial-gradient( circle at 15% 85%, rgba(37, 99, 235, 0.28), transparent 38% ), linear-gradient( 145deg, var(--navy-800), var(--navy-950) );
}
* Username dropdown */
.select-wrapper {
    position: relative;
    width: 100%;
}

.form-select {
    width: 100%;
    height: 52px;
    padding: 0 44px 0 16px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Custom dropdown arrow */
.select-wrapper::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

/* Hover */
.form-select:hover {
    border-color: #64748b;
}

/* Focus */
.form-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Disabled */
.form-select:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
}

/* Validation */
.text-danger {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #dc2626;
}
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

    .brand-logo strong,
    .mobile-brand strong {
        color: #60a5fa;
    }

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--blue-600);
    color: var(--white);
    font-size: 24px;
    font-weight: 800;
}

.brand-message {
    max-width: 480px;
    margin: 50px 0;
}

.eyebrow {
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
}

.login-brand .eyebrow {
    color: #93c5fd;
}

.brand-message h1 {
    margin: 18px 0;
    font-size: clamp(32px, 4vw, 49px);
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.brand-message > p:last-child {
    max-width: 390px;
    color: #c5d2e5;
    font-size: 16px;
    line-height: 1.8;
}

.brand-footer {
    color: #a7b7d0;
    font-size: 12px;
}
/* Login form area */
.login-content {
    display: grid;
    place-items: center;
    padding: 40px 24px;
    background: var(--white);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.mobile-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    font-size: 20px;
    font-weight: 700;
}

.login-card h2 {
    margin-top: 10px;
    font-size: 30px;
    letter-spacing: -0.8px;
}

.login-description {
    margin: 10px 0 32px;
    color: var(--text-secondary);
    font-size: 14px;
}
/* Inputs */
.form-group {
    margin-bottom: 22px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 700;
    }

    .form-group input {
        width: 100%;
        height: 48px;
        padding: 0 14px;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        outline: none;
        background: var(--white);
        color: var(--text-primary);
        font-size: 14px;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

        .form-group input::placeholder {
            color: #9aa8bc;
        }

        .form-group input:focus {
            border-color: var(--blue-600);
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
        }

.password-wrapper {
    position: relative;
}

    .password-wrapper input {
        padding-right: 65px;
    }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--blue-600);
    font-size: 12px;
    font-weight: 700;
}
/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 18px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--blue-600);
    color: var(--white);
    font-weight: 700;
    transition: background 0.2s, transform 0.2s;
}

    .btn-primary:hover {
        background: var(--blue-700);
    }

    .btn-primary:active {
        transform: scale(0.99);
    }

    .btn-primary:focus-visible,
    .password-toggle:focus-visible {
        outline: 3px solid #93c5fd;
        outline-offset: 3px;
    }

.login-button {
    width: 100%;
    margin-top: 8px;
}

.login-message {
    min-height: 8px;
    margin-bottom: 10px;
    color: var(--danger);
    font-size: 13px;
}

.login-help {
    margin-top: 28px;
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
}
/* Responsive layout */
@media (max-width: 800px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-content {
        padding: 32px 24px;
    }

    .mobile-brand {
        display: flex;
    }

    .login-card h2 {
        font-size: 27px;
    }
}

@media (max-width: 420px) {
    .login-content {
        padding: 24px 18px;
    }
}
/* ========================================
   POS APPLICATION LAYOUT
======================================== */
.pos-page {
    background: #f3f6fb;
}

.pos-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    min-height: 100vh;
}
/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 26px 16px;
    background: var(--navy-950);
    color: white;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 8px 36px;
    color: white;
    text-decoration: none;
    font-size: 19px;
    font-weight: 750;
}

    .sidebar-brand strong {
        color: #60a5fa;
    }

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border-radius: 9px;
    color: #c5d2e5;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

    .nav-link span {
        width: 22px;
        text-align: center;
        font-size: 19px;
    }

    .nav-link:hover,
    .nav-link.active {
        background: var(--blue-600);
        color: white;
    }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 20px 5px 0;
    border-top: 1px solid #263956;
    font-size: 12px;
}

.user-avatar,
.topbar-avatar {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--blue-600);
    color: white;
    font-weight: 700;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
}

.sidebar-user small {
    margin-top: 4px;
    color: #9aacc7;
}

.sidebar-user .online-status {
    color: #6ee7b7;
}
/* Main header */
.main-content {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 30px;
    background: white;
    border-bottom: 1px solid var(--border);
}

    .topbar h1 {
        margin-top: 4px;
        font-size: 24px;
        letter-spacing: -0.6px;
    }

.breadcrumb {
    color: var(--text-secondary);
    font-size: 12px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 600;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    background: var(--navy-800);
}

.status-badge {
    padding: 6px 10px;
    border-radius: 20px;
    background: #eaf1ff;
    color: var(--blue-700);
    font-size: 11px;
}
/* Page workspace */
.page-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 26px 30px;
}

.invoice-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 22px;
}

    .invoice-meta > div {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 12px;
    }

    .invoice-meta span,
    .invoice-meta label {
        color: var(--text-secondary);
    }

    .invoice-meta input,
    .invoice-meta select {
        min-height: 36px;
        padding: 6px 10px;
        border: 1px solid var(--border);
        border-radius: 7px;
        background: white;
        color: var(--text-primary);
    }
/* Main columns */
.sales-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(285px, 0.9fr);
    align-items: start;
    gap: 20px;
}

.sales-main,
.checkout-column {
    display: grid;
    align-content: start;
    gap: 20px;
    min-width: 0;
}
/* Panels */
.panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid #e2e9f4;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: 0 3px 12px rgba(18, 38, 75, 0.025);
}

    .panel h2 {
        font-size: 16px;
        letter-spacing: -0.2px;
    }

.panel-heading {
    display: flex;
    justify-content: space-between;
    padding-bottom: 17px;
    border-bottom: 1px solid #e9eef6;
}

    .panel-heading p {
        margin-top: 5px;
        color: var(--text-secondary);
        font-size: 12px;
    }
/* Form grids */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
    margin-top: 20px;
}

.form-group {
    min-width: 0;
    margin-bottom: 0;
}

    .form-group input,
    .form-group select {
        display: block;
        width: 100%;
        min-width: 0;
    }

.full-width {
    grid-column: 1 / -1;
}

.customer-types {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.customer-type {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: white;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
}

    .customer-type.selected {
        border-color: var(--blue-600);
        background: #eff5ff;
        color: var(--blue-700);
    }

    .customer-type input,
    .payment-option input {
        accent-color: var(--blue-600);
    }
/* Product entry */
.product-form {
    display: grid;
    grid-template-columns: minmax(130px, 1.6fr) minmax(85px, 1fr) minmax(70px, 0.7fr) minmax(90px, 0.9fr) minmax(65px, 0.65fr) minmax(75px, 0.75fr);
    gap: 12px;
    align-items: end;
    margin: 20px 0;
}

    .product-form label {
        font-size: 11px;
    }

    .product-form input {
        height: 42px;
        padding: 8px;
        font-size: 12px;
    }

    .product-form button {
        grid-column: 1 / -1;
        justify-self: end;
    }
/* Invoice table */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5ebf4;
    border-radius: 8px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 12px;
}

    .invoice-table th {
        padding: 13px 11px;
        background: #f1f5fb;
        color: #354969;
        text-align: left;
        font-weight: 700;
    }

    .invoice-table td {
        padding: 14px 11px;
        border-top: 1px solid #e8edf5;
    }

    .invoice-table tbody tr:hover {
        background: #fafcff;
    }

.empty-state {
    padding: 35px 12px !important;
    color: var(--text-secondary);
    text-align: center;
}
/* Buttons */
.btn-primary {
    border-radius: 8px;
}
/* Order summary */
.order-summary h2,
.payment-panel h2 {
    margin-bottom: 22px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 19px 0;
    font-size: 13px;
}

    .summary-row span {
        color: var(--text-secondary);
    }

    .summary-row strong {
        text-align: right;
        overflow-wrap: anywhere;
    }

.summary-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding: 17px 13px;
    border-radius: 8px;
    background: #edf3ff;
    color: var(--navy-800);
}

    .summary-total strong {
        font-size: 20px;
        overflow-wrap: anywhere;
    }

.payment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #405575;
    font-size: 12px;
    cursor: pointer;
}

    .payment-option.selected {
        border-color: var(--blue-600);
        background: #eff5ff;
        color: var(--blue-700);
    }

.payment-amount {
    margin-top: 22px;
}

.amount-due-row {
    padding: 12px;
    border-radius: 7px;
    background: #f2f5fa;
}

.checkout-button {
    width: 100%;
    margin-top: 18px;
}
/* Responsive layout */
@media (max-width: 1150px) {
    .pos-layout {
        grid-template-columns: 205px minmax(0, 1fr);
    }

    .page-content {
        padding: 22px 18px;
    }

    .topbar {
        padding: 20px 18px;
    }

    .sales-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .checkout-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
        padding: 16px;
    }

    .sidebar-brand {
        margin-bottom: 15px;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
    }

    .nav-link {
        flex-shrink: 0;
    }

    .sidebar-user {
        display: none;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-user > span:not(.status-badge):not(.topbar-avatar) {
        display: none;
    }

    .checkout-column {
        grid-template-columns: 1fr;
    }

    .product-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .product-form button {
            grid-column: 1 / -1;
            justify-self: stretch;
        }
}

@media (max-width: 450px) {
    .topbar {
        flex-direction: column;
    }

    .invoice-meta {
        gap: 12px;
    }

        .invoice-meta > div {
            flex-wrap: wrap;
        }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }

    .panel {
        padding: 15px;
    }

    .customer-types {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.item-remove {
    padding: 6px 9px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 700;
}

    .item-remove:hover {
        background: #fee2e2;
    }

.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}
