/* === POS Sistemi — Turuncu Tema === */
:root {
    --primary: #FF6B35;
    --primary-dark: #E55A25;
    --primary-light: #FF8C5A;
    --primary-bg: #FFF3EE;
    --primary-border: #FFD0BC;

    --sidebar-bg: #1A1A2E;
    --sidebar-text: rgba(255, 255, 255, 0.72);
    --sidebar-hover: rgba(255, 107, 53, 0.15);
    --sidebar-active-bg: rgba(255, 107, 53, 0.22);
    --sidebar-active-txt: #FF6B35;
    --sidebar-width: 240px;

    --header-h: 56px;
    --header-bg: #FFFFFF;
    --header-border: #F0F0F0;

    --body-bg: #F4F5F7;
    --card-bg: #FFFFFF;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
    --radius: 10px;

    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --border: #E5E7EB;

    --green: #22C55E;
    --red: #EF4444;
    --blue: #3B82F6;
    --yellow: #F59E0B;
    --purple: #8B5CF6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: transform 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.brand-sub {
    display: block;
    color: var(--sidebar-text);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.3);
    padding: 14px 8px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 7px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-txt);
}

.nav-item i {
    font-size: 16px;
    flex-shrink: 0;
}

.nav-item span {
    flex: 1;
}

.nav-badge {
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    display: block;
    color: var(--sidebar-text);
    font-size: 11px;
}

.btn-logout {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 5px;
    font-size: 16px;
    transition: color 0.15s;
}

.btn-logout:hover {
    color: var(--red);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* ============================================================
   HEADER
   ============================================================ */
.main-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-h);
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 90;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    display: none;
}

.page-info {
    display: flex;
    align-items: center;
}

.page-title {
    font-weight: 600;
    font-size: 15px;
}

.text-primary-color {
    color: var(--primary) !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-time {
    font-size: 13px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.btn-pos-quick {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-pos-quick:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

.page-container {
    padding: 24px;
    max-width: 1400px;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h4 {
    font-weight: 700;
}

.main-footer {
    padding: 16px 24px;
    color: var(--text-secondary);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

.footer-version {
    font-weight: 600;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: none;
}

.card-body {
    padding: 18px;
}

.card-danger {
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================================
   STATS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--card-shadow);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.bg-orange {
    background: var(--primary);
}

.bg-blue {
    background: var(--blue);
}

.bg-green {
    background: var(--green);
}

.bg-purple {
    background: var(--purple);
}

.bg-red {
    background: var(--red);
}

.bg-yellow {
    background: var(--yellow);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

/* ============================================================
   TABLE TILES (Dashboard & Table Management)
   ============================================================ */
.table-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.table-tile {
    border-radius: 9px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
    border: 2px solid transparent;
}

.table-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.table-tile-empty {
    background: #ECFDF5;
    border-color: #86EFAC;
}

.table-tile-occupied {
    background: #FFF3EE;
    border-color: var(--primary-border);
}

.table-tile-reserved {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.table-tile-bill {
    background: #FEF9C3;
    border-color: #FDE047;
}

.table-tile-inactive {
    background: #F3F4F6;
    border-color: #D1D5DB;
    opacity: 0.6;
}

.tile-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

.tile-cap {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 3px 0;
}

.tile-status {
    font-size: 11px;
    font-weight: 600;
}

.table-tile-empty .tile-status {
    color: var(--green);
}

.table-tile-occupied .tile-status {
    color: var(--primary);
}

.table-tile-reserved .tile-status {
    color: var(--blue);
}

.table-tile-bill .tile-status {
    color: var(--yellow);
}

/* Table management tiles */
.table-tile-manage {
    border-radius: 9px;
    padding: 12px 8px;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
}

.table-tile-manage .tile-actions {
    display: none;
    position: absolute;
    bottom: 4px;
    right: 4px;
    gap: 3px;
}

.table-tile-manage:hover .tile-actions {
    display: flex;
}

.tile-edit-btn,
.tile-delete-btn {
    background: rgba(0, 0, 0, 0.07);
    border: none;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
}

.tile-delete-btn {
    color: var(--red);
}

.tile-go-pos {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 11px;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.tab-count {
    background: rgba(0, 0, 0, 0.12);
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.filter-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-orange {
    background: var(--primary);
}

.dot-green {
    background: var(--green);
}

.dot-red {
    background: var(--red);
}

/* ============================================================
   TABLE (data tables)
   ============================================================ */
.pos-table {
    margin: 0;
}

.pos-table thead th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    padding: 12px 16px;
    background: #FAFAFA;
    border-bottom: 1px solid var(--border);
    border-top: none;
    white-space: nowrap;
}

.pos-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.pos-table tbody tr:last-child td {
    border-bottom: none;
}

.pos-table tbody tr:hover {
    background: var(--primary-bg);
}

.row-inactive {
    opacity: 0.55;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge-open {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-paid {
    background: #ECFDF5;
    color: #16A34A;
    border: 1px solid #86EFAC;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-cancelled {
    background: #FEF2F2;
    color: var(--red);
    border: 1px solid #FECACA;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-empty {
    background: #ECFDF5;
    color: #16A34A;
    border: 1px solid #86EFAC;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-occupied {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-reserved {
    background: #EFF6FF;
    color: var(--blue);
    border: 1px solid #93C5FD;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-bill {
    background: #FEF9C3;
    color: #CA8A04;
    border: 1px solid #FDE047;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.badge-cat {
    background: #F3F4F6;
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary-pos {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 7px !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
    transition: background 0.15s !important;
}

.btn-primary-pos:hover {
    background: var(--primary-dark) !important;
}

.btn-primary-pos.btn-sm {
    padding: 5px 10px !important;
    font-size: 12px !important;
}

/* ============================================================
   OPEN ORDER LIST (Dashboard)
   ============================================================ */
.order-list {}

.order-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.order-list-item:last-child {
    border-bottom: none;
}

.order-list-item:hover {
    background: var(--primary-bg);
}

.oli-table {
    font-weight: 600;
    font-size: 13px;
}

.oli-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.oli-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.oli-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
}

/* ============================================================
   TOP PRODUCTS
   ============================================================ */
.top-products-list {}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.top-product-item:last-child {
    border-bottom: none;
}

.rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    background: #F3F4F6;
    color: var(--text-secondary);
}

.rank-1 {
    background: #FEF9C3;
    color: #CA8A04;
}

.rank-2 {
    background: #F3F4F6;
    color: #6B7280;
}

.rank-3 {
    background: #FEF3C7;
    color: #92400E;
}

.prod-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}

.prod-qty {
    font-size: 12px;
    color: var(--text-secondary);
}

.prod-rev {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================================
   PAYMENT BAR
   ============================================================ */
.pay-method-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pay-label {
    font-size: 13px;
    min-width: 90px;
}

.pay-bar-wrap {
    flex: 1;
    height: 7px;
    background: #F3F4F6;
    border-radius: 10px;
    overflow: hidden;
}

.pay-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    min-width: 4px;
    transition: width 0.5s ease;
}

.pay-amount {
    font-size: 12px;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 14px;
}

/* ============================================================
   RECEIPT
   ============================================================ */
.receipt-card {
    max-width: 580px;
}

.receipt-header {
    text-align: center;
    margin-bottom: 16px;
}

.receipt-brand {
    font-size: 20px;
    margin-bottom: 4px;
}

.receipt-brand i {
    color: var(--primary);
    margin-right: 8px;
}

.receipt-address,
.receipt-phone {
    font-size: 13px;
    color: var(--text-secondary);
}

.receipt-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.receipt-table {
    margin: 0;
}

.receipt-totals {}

.rt-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.rt-total {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    border-bottom: none;
    padding-top: 10px;
}

.receipt-footer-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

/* ============================================================
   SETTINGS INFO
   ============================================================ */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

/* ============================================================
   FORM HINTS
   ============================================================ */
.form-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.form-hint a {
    color: var(--primary);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

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

.login-logo {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    margin: 0 auto 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 4px 0 0;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 14px;
    transition: border-color 0.15s;
    font-family: inherit;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.input-password {
    position: relative;
}

.input-password .form-control {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.btn-login {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

/* ============================================================
   ████ POS SCREEN ████
   ============================================================ */
body.pos-mode {
    background: #1A1A2E;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.pos-header {
    background: #1A1A2E;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.pos-header-left,
.pos-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-pos-back {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 18px;
    transition: color 0.15s;
}

.btn-pos-back:hover {
    color: var(--primary);
}

.pos-brand {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.pos-brand i {
    color: var(--primary);
}

.pos-time {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

.pos-user {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.btn-pos-logout {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.15s;
}

.btn-pos-logout:hover {
    background: var(--red);
    color: #fff;
}

.pos-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    flex: 1;
    overflow: hidden;
}

/* ----- Products Panel ----- */
.pos-products-panel {
    background: #F4F5F7;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #E5E7EB;
}

.pos-table-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.pos-active-table {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    color: var(--text-primary);
}

.pos-order-id {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 10px;
}

.pos-no-table {
    color: var(--text-secondary);
    font-size: 13px;
}

.btn-change-table,
.btn-select-table {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--primary-border);
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.btn-change-table:hover,
.btn-select-table:hover {
    background: var(--primary);
    color: #fff;
}

.pos-cat-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: none;
}

.pos-cat-tabs::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.15s;
}

.cat-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pos-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    color: var(--text-secondary);
}

.pos-search input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
}

.pos-products-grid {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    align-content: start;
}

.product-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 13px 11px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    text-align: center;
}

.product-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
}

.product-card:active {
    transform: scale(0.97);
}

.pc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.pc-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.pc-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 7px;
}

.pc-add {
    position: absolute;
    top: 7px;
    right: 7px;
    color: var(--primary);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.15s;
}

.product-card:hover .pc-add {
    opacity: 1;
}

.pos-empty-products {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.pos-empty-products i {
    font-size: 40px;
    opacity: 0.3;
    display: block;
    margin-bottom: 10px;
}

/* adding animation */
@keyframes flashAdd {
    0% {
        border-color: var(--primary);
        transform: scale(1.04);
    }

    100% {
        border-color: var(--border);
        transform: scale(1);
    }
}

.product-card.just-added {
    animation: flashAdd 0.35s ease forwards;
}

/* ----- Order Panel ----- */
.pos-order-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--border);
}

.order-panel-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.order-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.order-items-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    gap: 8px;
    border-bottom: 1px solid #F5F5F5;
    transition: background 0.1s;
}

.order-item:hover {
    background: var(--primary-bg);
}

.oi-info {
    flex: 1;
    min-width: 0;
}

.oi-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.oi-unit-price {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.oi-qty-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.qty-val {
    font-weight: 700;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.oi-total {
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
    min-width: 65px;
    text-align: right;
}

.empty-order {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    padding: 40px 20px;
    text-align: center;
}

.empty-order i {
    font-size: 48px;
    opacity: 0.25;
    margin-bottom: 12px;
}

/* ----- Order Summary ----- */
.order-summary {
    padding: 12px 14px;
    background: #FAFAFA;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
}

.summary-total {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 2px solid var(--primary-border);
}

.discount-row {
    color: var(--text-secondary);
}

.discount-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    padding: 3px 8px;
    background: #fff;
}

.discount-currency {
    font-size: 12px;
    color: var(--text-secondary);
}

.discount-input {
    width: 70px;
    border: none;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    text-align: right;
    background: transparent;
}

/* ----- Payment Buttons ----- */
.payment-section {
    padding: 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pay-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 13px 6px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.15s;
}

.pay-btn i {
    font-size: 22px;
}

.pay-cash {
    background: #ECFDF5;
    color: #16A34A;
    border-color: #86EFAC;
}

.pay-card {
    background: #EFF6FF;
    color: var(--blue);
    border-color: #93C5FD;
}

.pay-transfer {
    background: #F5F3FF;
    color: var(--purple);
    border-color: #C4B5FD;
}

.pay-cash:hover {
    background: #16A34A;
    color: #fff;
    border-color: #16A34A;
}

.pay-card:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.pay-transfer:hover {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
}

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

.btn-cancel-order {
    width: 100%;
    background: none;
    border: 1px solid #FECACA;
    color: var(--red);
    border-radius: 7px;
    padding: 7px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-cancel-order:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.no-order-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: var(--text-secondary);
}

.no-order-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 16px;
}

.btn-select-table-big {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 12px;
    display: flex;
    align-items: center;
}

.btn-select-table-big:hover {
    background: var(--primary-dark);
}

/* ----- POS Modal (Table Selector) ----- */
.pos-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pos-modal.show {
    display: flex;
}

.pos-modal-content {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.pos-modal-sm {
    max-width: 380px;
}

.pos-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.pos-modal-header h5 {
    margin: 0;
    font-weight: 700;
}

.pos-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.pos-modal-close:hover {
    color: var(--red);
}

.pos-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.modal-table-tile {
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    background: none;
    transition: all 0.15s;
    font-family: inherit;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    width: 100%;
}

.modal-table-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.mtile-empty {
    background: #ECFDF5;
    border-color: #86EFAC;
}

.mtile-occupied {
    background: var(--primary-bg);
    border-color: var(--primary-border);
}

.mtile-reserved {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.mt-name {
    font-weight: 700;
    font-size: 14px;
}

.mt-section {
    font-size: 11px;
    color: var(--text-secondary);
}

.mt-cap {
    font-size: 12px;
    margin: 4px 0;
    color: var(--text-secondary);
}

.mt-status {
    margin-top: 4px;
}

.badge-occ {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

.badge-res {
    background: var(--blue);
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

.badge-emp {
    background: var(--green);
    color: #fff;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
}

/* ============================================================
   PAYMENT SUCCESS TOAST (for AJAX)
   ============================================================ */
.pos-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1A1A2E;
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 320px;
}

.pos-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.pos-toast.toast-success {
    border-left: 4px solid var(--green);
}

.pos-toast.toast-error {
    border-left: 4px solid var(--red);
}

.pos-toast.toast-info {
    border-left: 4px solid var(--primary);
}

.pos-toast i {
    font-size: 18px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .pos-body {
        grid-template-columns: 1fr 300px;
    }

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

@media (max-width: 768px) {
    :root {
        --sidebar-width: 240px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-overlay.open {
        display: block;
    }

    .sidebar-toggle {
        display: flex !important;
    }

    .main-header {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .pos-body {
        grid-template-columns: 1fr;
    }

    .pos-order-panel {
        position: fixed;
        right: 0;
        top: 52px;
        bottom: 0;
        width: 300px;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        z-index: 200;
    }

    .pos-order-panel.open {
        transform: translateX(0);
    }
}

@media print {

    .sidebar,
    .main-header,
    .page-header .btn,
    .card-danger,
    nav {
        display: none !important;
    }

    .main-content {
        margin: 0;
    }

    .receipt-card {
        box-shadow: none;
        border: none;
    }
}