@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-app: #f3f5f9;
    --bg-auth-1: #4f2608;
    --bg-auth-2: #8b4513;
    --bg-auth-3: #c77a42;
    --text-main: #202430;
    --text-soft: #6b7280;
    --brand: #8b4513;
    --brand-dark: #5f2f0c;
    --brand-light: #d8b090;
    --white: #ffffff;
    --shadow-sm: 0 8px 20px rgba(19, 17, 14, 0.08);
    --shadow-md: 0 16px 40px rgba(19, 17, 14, 0.12);
    --radius-md: 12px;
    --radius-lg: 18px;
}

body {
    margin: 0;
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 5% 8%, rgba(139, 69, 19, 0.08) 0, transparent 35%),
        radial-gradient(circle at 95% 92%, rgba(139, 69, 19, 0.05) 0, transparent 30%),
        var(--bg-app);
}

.auth-body {
    min-height: 100vh;
    background: linear-gradient(145deg, var(--bg-auth-1) 0%, var(--bg-auth-2) 45%, var(--bg-auth-3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lp-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 20%, rgba(255, 255, 255, 0.18) 0, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.15) 0, transparent 25%),
        linear-gradient(145deg, var(--bg-auth-1) 0%, var(--bg-auth-2) 45%, var(--bg-auth-3) 100%);
    color: #fff;
}

.navbar {
    background: linear-gradient(120deg, #6f350f 0%, #8b4513 55%, #a25524 100%);
    box-shadow: 0 8px 18px rgba(69, 30, 8, 0.28);
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.3px;
}

.navbar .nav-link,
.navbar .btn-link.nav-link {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

.navbar .nav-link:hover,
.navbar .btn-link.nav-link:hover {
    color: #fff;
}

.sidebar {
    background: linear-gradient(180deg, #fff 0%, #f9fafc 100%);
    border-right: 1px solid #e8ebf0;
    min-height: calc(100vh - 56px);
    padding: 18px 0;
}

.sidebar .nav-link {
    color: #4b5563;
    margin: 2px 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border-left: 3px solid transparent;
    transition: all 0.25s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--brand);
    background-color: #f5ebe5;
    border-left-color: var(--brand);
}


h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card {
    border: 1px solid #eceff3;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background-color: var(--white);
    border-bottom: 1px solid #eceff3;
}

.table {
    --bs-table-bg: transparent;
}

.table-hover tbody tr:hover {
    background-color: #f6f8fb;
}

.badge {
    font-weight: 600;
}

.alert {
    border-radius: 10px;
    border: 0;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.08);
}

.caixa-floating-notices {
    position: fixed;
    top: 74px;
    right: 16px;
    width: min(430px, calc(100vw - 24px));
    z-index: 1080;
}

.caixa-floating-alert {
    margin-bottom: 10px;
    box-shadow: 0 16px 28px rgba(17, 24, 39, 0.2);
}

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
}

.form-control,
.form-select,
.input-group-text {
    border-radius: 10px;
    border-color: #e3e8ef;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.16);
}

.login-container,
.auth-card {
    background-color: var(--white);
    border: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.login-container {
    width: 100%;
    max-width: 430px;
    padding: 36px;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h1 {
    color: var(--brand);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-soft);
    margin-bottom: 0;
}

.btn-login,
.btn-primary-custom {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 700;
}

.btn-login:hover,
.btn-primary-custom:hover {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eceff3;
    color: var(--text-soft);
}

.register-link a,
.auth-link {
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.register-link a:hover,
.auth-link:hover {
    text-decoration: underline;
}

.auth-wrapper {
    width: 100%;
    max-width: 840px;
}

.auth-logo {
    font-size: 3rem;
    color: var(--brand);
}

.lp-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.lp-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.lp-title {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.lp-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.86);
    max-width: 680px;
}

.lp-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--radius-lg);
    padding: 26px;
    color: var(--text-main);
    box-shadow: var(--shadow-md);
}

.lp-feature-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.lp-feature-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    color: #384152;
}

.lp-feature-list i {
    color: var(--brand);
    margin-top: 2px;
}

.caixa-qtd-input {
    max-width: 82px;
}

.page-caixa .container.py-4 {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
}

.page-caixa .caixa-screen {
    height: min(900px, calc(100vh - 74px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pos-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.45rem;
}

.pos-topbar h1 {
    font-size: 1.45rem;
    line-height: 1.1;
    margin: 0;
}

.pos-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pos-chip {
    background: #f0f4fb;
    color: #344054;
    border: 1px solid #d8e0ec;
    border-radius: 999px;
    font-size: 0.84rem;
    padding: 4px 10px;
}

.caixa-touch-toggle {
    font-weight: 700;
    min-height: 38px;
}

.caixa-touch-toggle[aria-pressed="true"] {
    background: #f3e7dd;
    border-color: #c99e7f;
    color: #5f2f0c;
}

.pos-main {
    flex: 1 1 auto;
    min-height: 0;
}

.pos-left-col,
.pos-right-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0.55rem;
}

.caixa-screen .card {
    border-color: #e3e8f2;
    box-shadow: 0 8px 24px rgba(22, 30, 44, 0.08);
    border-radius: 14px;
}

.caixa-screen .card-header {
    padding: 0.6rem 0.8rem;
}

.caixa-screen .card-body {
    padding: 0.75rem 0.8rem;
}

.caixa-screen .form-label {
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pos-scan-card {
    border-top: 3px solid var(--brand);
}

.pos-scan-card .form-control-lg {
    min-height: 52px;
    font-size: 1.05rem;
    font-weight: 600;
}

.caixa-sugestoes {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    border: 1px solid #d8e1ef;
    border-radius: 10px;
    background: #fff;
    max-height: 260px;
    overflow-y: auto;
    z-index: 40;
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.14);
}

.caixa-sugestao-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #edf1f7;
    background: #fff;
    padding: 10px 12px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: background-color 0.15s ease;
}

.caixa-sugestao-item:last-child {
    border-bottom: 0;
}

.caixa-sugestao-item:hover {
    background: #f6f9ff;
}

.caixa-sugestao-item.is-disabled,
.caixa-sugestao-item:disabled {
    background: #f8f9fb;
    color: #8b95a7;
    cursor: not-allowed;
}

.caixa-sugestao-vazia {
    padding: 12px;
    color: #6c757d;
    font-size: 0.95rem;
}

.pos-products-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pos-products-card .card-body {
    min-height: 0;
}

.pos-products-scroll {
    height: 100%;
    max-height: 100%;
    overflow: auto;
    padding-right: 2px;
}

.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.pos-product-item {
    border: 1px solid #e4eaf5;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.pos-product-item h6 {
    font-size: 0.95rem;
    line-height: 1.15;
    font-weight: 700;
}

.pos-product-item.is-out {
    opacity: 0.72;
}

.pos-right-col {
    position: relative;
}

.pos-cart-card {
    position: sticky;
    top: 6px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pos-cart-card .card-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pos-cart-list {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: 40vh;
    overflow: auto;
    padding-right: 2px;
}

.pos-cart-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #ebeff6;
    padding: 8px 0;
}

.pos-cart-row:last-child {
    border-bottom: 0;
}

.pos-cart-name {
    font-weight: 800;
    line-height: 1.15;
}

.pos-cart-meta {
    font-size: 0.78rem;
    color: #6b7280;
}

.pos-cart-qtd {
    font-weight: 800;
    color: #1f2937;
}

.pos-cart-subtotal {
    font-weight: 700;
    min-width: 90px;
    text-align: right;
}

.pos-total-box {
    background: #111827;
    color: #f8fafc;
    border-radius: 12px;
    text-align: center;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
}

.pos-total-box.is-empty {
    margin-top: auto;
}

.pos-total-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 0.04em;
}

.pos-total-value {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    line-height: 1.05;
}

.pos-payment-block {
    margin-top: 2px;
}

.split-payment-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 8px;
}

.split-summary {
    background: #f8fbff;
    border: 1px solid #dce7f7;
    border-radius: 10px;
    padding: 8px 10px;
}

.caixa-dinheiro-bloco {
    background: #f9fbff;
    border: 1px solid #d7e4f8;
    border-radius: 10px;
    padding: 8px;
}

.pos-finalizar-btn {
    min-height: 54px;
    font-size: 1.05rem;
    font-weight: 800;
}

.caixa-pagination-wrap {
    display: flex;
    justify-content: flex-end;
}

.caixa-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.caixa-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9e0ea;
    border-radius: 8px;
    background: #fff;
    color: #2f3a4c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.caixa-page-btn:hover {
    background: #f5f8ff;
    border-color: #c7d4ea;
    color: #1f2a3a;
}

.caixa-page-btn.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    pointer-events: none;
}

body.caixa-touch-mode .caixa-screen .btn {
    min-height: 58px;
    font-size: 1.04rem;
    border-radius: 13px;
}

body.caixa-touch-mode .caixa-screen .btn.btn-sm {
    min-height: 52px;
    font-size: 0.98rem;
}

body.caixa-touch-mode .caixa-screen .form-control,
body.caixa-touch-mode .caixa-screen .form-select,
body.caixa-touch-mode .caixa-screen .caixa-page-btn {
    min-height: 56px;
    font-size: 1rem;
    border-radius: 13px;
}

body.caixa-touch-mode .pos-product-item {
    padding: 12px;
}

body.caixa-touch-mode .pos-cart-row {
    padding: 10px 0;
}

body.caixa-touch-mode .split-payment-row {
    grid-template-columns: 1fr;
}

@media (max-height: 900px) {
    .page-caixa .caixa-screen {
        height: calc(100vh - 74px);
    }

    .pos-topbar h1 {
        font-size: 1.3rem;
    }

    .pos-topbar {
        margin-bottom: 0.35rem;
    }

    .caixa-screen .card-header {
        padding: 0.5rem 0.8rem;
    }

    .caixa-screen .card-body {
        padding: 0.62rem 0.72rem;
    }

    .pos-products-scroll {
        max-height: 36vh;
    }

    .pos-cart-list {
        max-height: 29vh;
    }
}

@media (max-width: 767px) {
    .auth-body {
        padding: 14px;
    }

    .login-container {
        padding: 24px;
    }

    .lp-hero {
        padding: 24px 0;
    }

    .sidebar {
        min-height: auto;
    }

    main {
        padding-top: 18px;
    }

    .page-caixa .caixa-screen {
        height: auto;
        overflow: visible;
    }

    .pos-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .pos-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .pos-cart-card {
        position: static;
        height: auto;
    }

    .pos-cart-list,
    .pos-products-scroll {
        max-height: none;
    }

    .caixa-floating-notices {
        top: 66px;
        right: 10px;
        width: calc(100vw - 20px);
    }
}
