:root {
            --bg: #101010;
            --bg-elevated: #1f1f1f;
            --bg-panel: #262626;
            --accent: #0d84ff;
            --text: #f5f5f5;
            --text-muted: #9da0a8;
            --danger: #ff5263;
            --success: #44d17f;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
        }

body {
    background: var(--bg);
    color: var(--text);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#root {
    width: 100%;
    height: 100%;
}

.login-shell {
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at top, rgba(13, 132, 255, 0.18), rgba(0, 0, 0, 0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-panel {
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.login-card {
    width: 100%;
    padding: 32px 28px;
    border-radius: 24px;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-brand {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.login-input {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-size: 15px;
    width: 100%;
    display: block;
}

.login-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 132, 255, 0.18);
}

.login-ip {
    font-size: 12px;
    color: var(--text-muted);
}

.login-error {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 82, 99, 0.6);
    color: var(--danger);
    font-size: 13px;
}

.login-submit {
    width: 100%;
}

.login-meta {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.app-shell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.35s ease;
}

        .app-shell.ready {
            opacity: 1;
        }

        .fullscreen-overlay {
            position: fixed;
            inset: 0;
            background: radial-gradient(circle at top, #1d1d1d 0%, #050505 75%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 40px 24px;
            gap: 32px;
            z-index: 10;
        }

        .overlay-title {
            font-size: 20px;
            letter-spacing: 0.02em;
        }

        .overlay-instruction {
            font-size: 14px;
            color: var(--text-muted);
            max-width: 320px;
            line-height: 1.6;
        }

        .pulsing-button {
            width: 120px;
            height: 120px;
            border-radius: 32px;
            border: 1px solid var(--accent);
            background: linear-gradient(135deg, rgba(13, 132, 255, 0.25), rgba(13, 132, 255, 0.05));
            color: var(--text);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .pulsing-button::before,
        .pulsing-button::after {
            content: '';
            position: absolute;
            inset: 6px;
            border-radius: 28px;
            border: 1px solid rgba(13, 132, 255, 0.5);
            animation: pulse 2.2s infinite;
        }

        .pulsing-button::after {
            inset: 0;
            animation-delay: 0.6s;
        }

        .pulsing-button span {
            font-size: 13px;
            letter-spacing: 0.08em;
        }

        @keyframes pulse {
            0% { opacity: 0.9; transform: scale(0.95); }
            60% { opacity: 0; transform: scale(1.1); }
            100% { opacity: 0; transform: scale(1.1); }
        }

.pos-header {
    background: var(--bg-elevated);
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
    margin-bottom: 10px;
}

.header-title {
    font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.04em;
        }

.header-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.header-actions {
    gap: 10px;
}

.logout-button {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.logout-button:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.header-clock {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.categories-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.categories-bar::-webkit-scrollbar {
    display: none;
}

.view-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.view-tab {
    padding: 10px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.view-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(13, 132, 255, 0.3);
}

.view-tab:disabled {
    opacity: 0.75;
    cursor: default;
}

.category-btn {
    border: none;
    outline: none;
    padding: 10px 16px;
            border-radius: 20px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text);
            font-size: 14px;
            cursor: pointer;
            transition: 0.2s;
            white-space: nowrap;
        }

.category-btn.active {
    background: var(--accent);
    box-shadow: 0 12px 24px rgba(13, 132, 255, 0.24);
}

.active-order-banner {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(13, 132, 255, 0.12);
    border: 1px solid rgba(13, 132, 255, 0.4);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.banner-action {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.pos-layout {
    flex: 1;
    display: flex;
    gap: 18px;
    padding: 18px 18px 32px;
    background: radial-gradient(circle at top left, rgba(13, 132, 255, 0.24), transparent 45%);
}

.catalog-panel {
    flex: 1;
    background: var(--bg-panel);
    border-radius: 24px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.products-grid {
    padding: 10px 6px calc(140px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    overflow: auto;
}

        .product-card {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 20px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            cursor: pointer;
            transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s;
            min-height: 160px;
        }

        .product-card:hover {
            transform: translateY(-3px);
            border-color: rgba(13, 132, 255, 0.6);
            background: rgba(13, 132, 255, 0.05);
        }

.product-media {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-media.with-image {
    border: none;
    background: transparent;
    padding: 0;
}

.product-name {
    font-weight: 600;
    font-size: 15px;
    word-break: break-word;
    hyphens: auto;
}

.product-footer {
    font-size: 13px;
    color: var(--text-muted);
    word-break: break-word;
    white-space: normal;
}

.product-price {
    margin-top: auto;
    font-size: 18px;
    font-weight: 600;
}

.open-checks-panel {
    gap: 16px;
}

.open-checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    overflow: auto;
    padding-right: 6px;
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
}

.open-checks-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.open-check-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.check-card-id {
    font-weight: 600;
    color: var(--text);
}

.check-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.check-status {
    font-weight: 600;
}

.check-status.status-open {
    color: var(--success);
}

.check-status.status-closed {
    color: var(--danger);
}

.check-card-amount {
    font-size: 22px;
    font-weight: 700;
}

.check-card-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
}

.check-card-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.check-card-actions .btn {
    padding: 10px 16px;
    font-size: 14px;
}

.order-panel {
    width: min(420px, 100%);
    height: 100%;
    background: var(--bg-panel);
    border-radius: 24px 0 0 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.35);
}

.order-header {
    display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .order-total {
            font-size: 28px;
            font-weight: 700;
        }

        .order-count {
            font-size: 13px;
            color: var(--text-muted);
        }

.btn {
    padding: 14px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #0d84ff, #48caff);
    color: #fff;
    box-shadow: 0 12px 24px rgba(13, 132, 255, 0.28);
}

        .btn-secondary {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text);
            border: 1px solid rgba(255, 255, 255, 0.08);
        }

        .history-list {
            flex: 1;
            overflow: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 14px;
}

.history-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item-price {
    font-weight: 600;
}

.history-item-note {
    font-size: 12px;
    color: var(--text-muted);
}

.history-remove {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: var(--danger);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.history-remove:hover {
    border-color: rgba(255, 82, 99, 0.65);
    background: rgba(255, 82, 99, 0.1);
}

.combo-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.combo-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.combo-option.active {
    border-color: rgba(13, 132, 255, 0.8);
    background: rgba(13, 132, 255, 0.08);
}

.combo-option input {
    display: none;
}

.combo-option-details {
    flex: 1;
    margin-right: 12px;
}

.combo-option-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.combo-option-price {
    font-weight: 600;
    font-size: 15px;
}

.combo-modal-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.combo-modal-subtitle {
    color: var(--text-muted);
    margin-bottom: 18px;
}

.combo-modal-card {
    width: min(760px, calc(100% - 32px));
    max-height: min(92vh, 860px);
    display: flex;
    flex-direction: column;
}

.combo-modal-card .combo-modal-title {
    margin-bottom: 4px;
}

.combo-modal-header {
    flex: 0 0 auto;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.combo-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-top: 16px;
    margin-right: -8px;
    padding-right: 8px;
}

.combo-modal-body::-webkit-scrollbar {
    width: 6px;
}

.combo-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.combo-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.combo-modal-card .combo-actions {
    margin-top: 20px;
}

.builder-groups {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 16px;
}

.builder-group {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.015);
}

.builder-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    font-weight: 600;
}

.builder-group-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.builder-group-items {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.builder-option {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--text-primary);
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.builder-option:not(:disabled) {
    cursor: pointer;
}

.builder-option:hover:not(:disabled) {
    border-color: rgba(13, 132, 255, 0.4);
}

.builder-option.selected {
    border-color: rgba(13, 132, 255, 0.85);
    background: rgba(13, 132, 255, 0.12);
    color: #fff;
}

.builder-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.combo-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.empty-hint {
    color: var(--text-muted);
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

.catalog-status {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.catalog-status.error {
    color: var(--danger);
}

.order-summary-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    background: rgba(5, 5, 5, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 6;
}

.summary-button {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.summary-button:active {
    transform: translateY(1px);
}

.summary-button:hover {
    border-color: rgba(13, 132, 255, 0.5);
    background: rgba(13, 132, 255, 0.08);
}

.summary-title {
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.summary-positions {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.summary-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.summary-total {
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-total span {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.summary-total strong {
    font-size: 20px;
}

.summary-action {
    min-width: 160px;
}

.summary-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 18px;
    color: var(--accent);
}

.fullscreen-warning {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    z-index: 30;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    font-size: 13px;
}

.fullscreen-warning button {
    background: var(--accent);
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 240px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(15, 15, 15, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
    z-index: 40;
    font-size: 14px;
}

.toast.success {
    border-color: rgba(68, 209, 127, 0.6);
    color: var(--success);
}

.toast.info {
    border-color: rgba(13, 132, 255, 0.5);
    color: #d9ecff;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    padding: 20px;
}

.modal-card {
    width: min(420px, 100%);
    background: var(--bg-panel);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modal-card p {
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modal-textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions.modal-actions-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.order-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 8;
}

.order-drawer-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.drawer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.drawer-close {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: var(--text);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 960px) {
    body { overflow: auto; }
    .pos-layout {
        flex-direction: column;
        height: auto;
        padding-bottom: 80px;
    }
}

@media (max-width: 640px) {
    .order-summary-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .summary-total,
    .summary-action {
        width: 100%;
        min-width: 0;
    }
    .order-drawer-overlay {
        justify-content: center;
        align-items: flex-end;
        padding: 0 12px 12px;
    }
    .order-panel {
        width: 100%;
        height: auto;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.35);
    }
    .drawer-actions {
        grid-template-columns: 1fr;
    }
    .modal-actions {
        grid-template-columns: 1fr;
    }
    .combo-actions {
        grid-template-columns: 1fr;
    }
}
