/* ============================================================
   public/assets/css/app.css
   POS Multi-Restaurante — Modern Design System v2
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    /* Brand */
    --primary:      #e65100;
    --primary-dk:   #bf360c;
    --primary-lt:   #fff3e0;
    --accent:       #ffd54f;

    /* Semantic */
    --success:      #2e7d32;
    --success-lt:   #e8f5e9;
    --danger:       #c62828;
    --danger-lt:    #ffebee;
    --warning:      #f57f17;
    --warning-lt:   #fff8e1;
    --info:         #0277bd;
    --info-lt:      #e1f5fe;

    /* Neutrals */
    --gray-50:   #fafafa;
    --gray-100:  #f5f5f5;
    --gray-200:  #eeeeee;
    --gray-300:  #e0e0e0;
    --gray-400:  #bdbdbd;
    --gray-500:  #9e9e9e;
    --gray-600:  #757575;
    --gray-700:  #616161;
    --gray-800:  #424242;
    --gray-900:  #212121;
    --white:     #ffffff;

    /* Surfaces */
    --surface:   var(--white);
    --surface-2: var(--gray-50);
    --border:    var(--gray-300);

    /* Typography */
    --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
    --shadow-sm: 0 2px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,.12), 0 8px 16px rgba(0,0,0,.06);
    --shadow-up: 0 -4px 12px rgba(0,0,0,.07);

    /* Radius */
    --radius-sm:   4px;
    --radius:      8px;
    --radius-lg:   14px;
    --radius-xl:   20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease:          cubic-bezier(.4,0,.2,1);
    --ease-spring:   cubic-bezier(.34,1.56,.64,1);
    --ease-out:      cubic-bezier(0,0,.2,1);
    --transition:    160ms var(--ease);
    --transition-md: 260ms var(--ease);
    --transition-lg: 380ms var(--ease);

    /* Layout */
    --nav-height:  58px;
    --content-max: 1400px;
}

/* ── Base ──────────────────────────────────────────────────── */
body {
    font-family:    var(--font);
    background:     var(--gray-100);
    color:          var(--gray-900);
    min-height:     100vh;
    display:        flex;
    flex-direction: column;
    line-height:    1.5;
    font-size:      15px;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; color: var(--primary-dk); }
img { max-width: 100%; }

/* ── Page entrance animation ─────────────────────────────── */
@keyframes page-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.main-content { animation: page-enter .35s var(--ease-out) both; }

/* ────────────────────────────────────────────────────────────
   NAVIGATION
   ──────────────────────────────────────────────────────────── */
.main-nav {
    background:  var(--primary);
    color:       var(--white);
    display:     flex;
    align-items: center;
    gap:         .75rem;
    padding:     0 1.25rem;
    height:      var(--nav-height);
    box-shadow:  0 2px 12px rgba(0,0,0,.22);
    flex-shrink: 0;
    position:    sticky;
    top:         0;
    z-index:     200;
}
.nav-brand a {
    color:       var(--white);
    font-size:   1.1rem;
    font-weight: 800;
    display:     flex;
    align-items: center;
    gap:         .45rem;
    white-space: nowrap;
}
.nav-brand a:hover { text-decoration: none; }

.nav-links {
    display:         flex;
    list-style:      none;
    gap:             .125rem;
    flex:            1;
    align-items:     center;
    overflow-x:      auto;
    scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
    color:         rgba(255,255,255,.9);
    padding:       .4rem .8rem;
    border-radius: var(--radius-full);
    font-size:     .875rem;
    font-weight:   500;
    white-space:   nowrap;
    transition:    background var(--transition), color var(--transition), transform var(--transition);
    display:       flex;
    align-items:   center;
    gap:           .3rem;
}
.nav-links a:hover { background: rgba(255,255,255,.2); text-decoration: none; color: #fff; }
.nav-links a[aria-current] { background: rgba(255,255,255,.22); color: #fff; font-weight: 700; }
.nav-links a:active { transform: scale(.96); }

.nav-user {
    display:     flex;
    align-items: center;
    gap:         .5rem;
    font-size:   .8125rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}
.nav-restaurant {
    background:    rgba(255,255,255,.2);
    padding:       .25rem .625rem;
    border-radius: var(--radius-full);
    font-weight:   700;
    font-size:     .8125rem;
    border:        1px solid rgba(255,255,255,.15);
}
.nav-username  { opacity: .85; font-size: .8rem; }
.nav-logo-img  { height: 34px; max-width: 120px; object-fit: contain; border-radius: var(--radius-sm); }

/* ── Hamburger ───────────────────────────────────────────── */
.nav-hamburger {
    display:        none;
    flex-direction: column;
    justify-content: center;
    gap:             5px;
    width:           40px;
    height:          40px;
    border:          none;
    background:      rgba(255,255,255,.15);
    border-radius:   var(--radius);
    cursor:          pointer;
    padding:         8px 9px;
    transition:      background var(--transition);
    flex-shrink:     0;
    order:           -1;
}
.nav-hamburger:hover { background: rgba(255,255,255,.28); }
.nav-hamburger span {
    display:       block;
    height:        2px;
    background:    #fff;
    border-radius: 2px;
    transition:    transform var(--transition-md), opacity var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ───────────────────────────────────── */
.nav-drawer          { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 199; pointer-events: none; }
.nav-drawer.open     { pointer-events: auto; }
.nav-drawer-overlay  { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity var(--transition-md); backdrop-filter: blur(2px); }
.nav-drawer.open .nav-drawer-overlay { opacity: 1; }
.nav-drawer-panel {
    position:       absolute;
    top:  0; left: 0; bottom: 0;
    width:          80%;
    max-width:      300px;
    background:     var(--primary);
    transform:      translateX(-100%);
    transition:     transform var(--transition-md);
    overflow-y:     auto;
    padding:        4rem 0 2rem;
    box-shadow:     var(--shadow-lg);
    display:        flex;
    flex-direction: column;
}
.nav-drawer.open .nav-drawer-panel { transform: translateX(0); }
.nav-drawer-links { display: flex; flex-direction: column; list-style: none; padding: .5rem 0; flex: 1; }
.nav-drawer-links li a {
    display: flex; align-items: center; gap: .75rem;
    padding: .875rem 1.5rem;
    color:   rgba(255,255,255,.92);
    font-size: 1rem; font-weight: 500;
    transition: background var(--transition);
    border-left: 3px solid transparent;
}
.nav-drawer-links li a:hover,
.nav-drawer-links li a[aria-current] { background: rgba(255,255,255,.15); text-decoration: none; color: #fff; border-left-color: var(--accent); }
.nav-drawer-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; color: rgba(255,255,255,.6); }

/* ────────────────────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────────────────────── */
.btn, button[type=submit] {
    position:        relative;
    overflow:        hidden;
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             .4rem;
    padding:         .5625rem 1.125rem;
    border:          none;
    border-radius:   var(--radius);
    cursor:          pointer;
    font-size:       .9rem;
    font-weight:     600;
    font-family:     var(--font);
    background:      var(--primary);
    color:           var(--white);
    transition:      background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space:     nowrap;
    line-height:     1.25;
    text-decoration: none;
    touch-action:    manipulation;
    -webkit-font-smoothing: antialiased;
}
.btn:hover:not(:disabled), button[type=submit]:hover:not(:disabled) { background: var(--primary-dk); text-decoration: none; box-shadow: 0 4px 12px rgba(230,81,0,.35); }
.btn:active:not(:disabled), button[type=submit]:active:not(:disabled) { transform: scale(.96); box-shadow: none; }
.btn:focus-visible, button[type=submit]:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:disabled, button[type=submit]:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: btn-ripple .5s linear; background: rgba(255,255,255,.35); pointer-events: none; }
@keyframes btn-ripple { to { transform: scale(4); opacity: 0; } }

.btn-sm   { padding: .35rem .75rem;       font-size: .8125rem; }
.btn-lg   { padding: .6875rem 1.5rem;     font-size: 1rem; }
.btn-xl   { padding: .9375rem 1.875rem;   font-size: 1.0625rem; font-weight: 700; }
.btn-full { width: 100%; justify-content: center; }

.btn-secondary { background: var(--gray-200); color: var(--gray-800); }
.btn-secondary:hover:not(:disabled) { background: var(--gray-300); box-shadow: none; }

.btn-success  { background: var(--success); }
.btn-success:hover:not(:disabled)  { background: #1b5e20; box-shadow: 0 4px 12px rgba(46,125,50,.35); }

.btn-danger   { background: var(--danger); }
.btn-danger:hover:not(:disabled)   { background: #8b0000; box-shadow: 0 4px 12px rgba(198,40,40,.35); }

.btn-info     { background: var(--info); }
.btn-info:hover:not(:disabled)     { background: #01579b; }

.btn-outline  { background: transparent; color: var(--primary); border: 2px solid var(--primary); box-shadow: none; }
.btn-outline:hover:not(:disabled)  { background: var(--primary-lt); box-shadow: none; }

.btn-ghost {
    background: transparent; color: var(--gray-700);
    border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    padding: .5rem 1.125rem; font-size: .9rem; font-weight: 600;
    cursor: pointer; font-family: var(--font);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; box-shadow: none;
}
.btn-ghost:hover:not(:disabled) { background: var(--gray-100); color: var(--gray-900); border-color: var(--gray-400); box-shadow: none; text-decoration: none; }

.btn-xs {
    padding: .2rem .55rem; font-size: .75rem; border-radius: var(--radius-sm); font-weight: 600;
    background: rgba(255,255,255,.22); color: var(--white);
    display: inline-flex; align-items: center; gap: .25rem; overflow: hidden;
    transition: background var(--transition); cursor: pointer; font-family: var(--font);
    border: none; touch-action: manipulation; position: relative;
}
.btn-xs:hover { background: rgba(255,255,255,.38); box-shadow: none; }
.btn-xs.btn-danger { background: var(--danger); }

/* ────────────────────────────────────────────────────────────
   FORMS
   ──────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: .375rem; font-weight: 600; font-size: .875rem; color: var(--gray-700); }
.form-group label .req { color: var(--danger); }

.form-group input,
.form-group select,
.form-group textarea,
.form-control {
    width: 100%; padding: .5625rem .875rem;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    font-size: .9375rem; font-family: var(--font);
    background: var(--white); color: var(--gray-900);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    line-height: 1.5; -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,81,0,.14); background: #fffdf8; }
.form-group textarea { resize: vertical; min-height: 80px; }

.toggle-label { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: normal; font-size: .9rem; }
.toggle-label input[type=checkbox] { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }

.form-hint { color: var(--gray-500); display: block; margin-top: .3rem; font-size: .8125rem; line-height: 1.4; }
.field-error { display: block; color: var(--danger); font-size: .8125rem; margin-top: .25rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.input-sm { max-width: 135px; }
.form-actions { margin-top: 1.25rem; display: flex; gap: .625rem; align-items: center; flex-wrap: wrap; }
.required, .req { color: var(--danger); }

/* ────────────────────────────────────────────────────────────
   ALERTS / FLASH
   ──────────────────────────────────────────────────────────── */
.alert {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .875rem 1.125rem; border-radius: var(--radius-lg);
    margin-bottom: 1rem; font-size: .9rem;
    animation: alert-in .3s var(--ease-spring) both; position: relative;
}
@keyframes alert-in { from { opacity:0; transform:translateY(-8px) scale(.98); } to { opacity:1; transform:none; } }

.alert-success { background: var(--success-lt); color: #1b5e20; border-left: 4px solid var(--success); }
.alert-danger, .alert-error { background: var(--danger-lt);  color: #b71c1c; border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-lt); color: #7c4700; border-left: 4px solid var(--warning); }
.alert-info    { background: var(--info-lt);    color: #01579b; border-left: 4px solid var(--info); }
.alert-close { background: none; border: none; cursor: pointer; font-size: 1.1rem; line-height: 1; color: inherit; opacity: .5; padding: 0; flex-shrink: 0; margin-left: auto; transition: opacity var(--transition); }
.alert-close:hover { opacity: 1; }

/* ────────────────────────────────────────────────────────────
   LAYOUT
   ──────────────────────────────────────────────────────────── */
.main-content { flex: 1; padding: 1.5rem 1.375rem; max-width: var(--content-max); width: 100%; margin: 0 auto; }
.main-footer  { text-align: center; padding: .625rem; background: var(--gray-200); color: var(--gray-600); font-size: .78rem; border-top: 1px solid var(--gray-300); flex-shrink: 0; }

/* ────────────────────────────────────────────────────────────
   AUTH LAYOUT
   ──────────────────────────────────────────────────────────── */
.layout-auth {
    background:  linear-gradient(145deg, var(--primary) 0%, var(--primary-dk) 100%);
    display:     flex; align-items: center; justify-content: center;
    min-height:  100vh; padding: 1.5rem; position: relative;
}
.layout-auth::before {
    content: ''; position: fixed; inset: 0;
    background: radial-gradient(circle at 25% 35%, rgba(255,255,255,.09) 0%, transparent 55%),
                radial-gradient(circle at 80% 75%, rgba(0,0,0,.1) 0%, transparent 50%);
    pointer-events: none;
}
.auth-wrapper { width: 100%; max-width: 440px; position: relative; }
.auth-card {
    background: var(--white); border-radius: var(--radius-xl);
    padding: 2.5rem 2.25rem;
    box-shadow: 0 32px 64px rgba(0,0,0,.28), 0 8px 24px rgba(0,0,0,.12);
    animation: auth-enter .45s var(--ease-spring) both;
}
@keyframes auth-enter { from { opacity:0; transform:translateY(24px) scale(.97); } to { opacity:1; transform:none; } }
.auth-logo { text-align: center; margin-bottom: 2rem; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.auth-logo span { display: block; font-size: .85rem; font-weight: 500; color: var(--gray-500); margin-top: .25rem; }

/* ────────────────────────────────────────────────────────────
   DASHBOARD
   ──────────────────────────────────────────────────────────── */
.dashboard h2 { margin-bottom: .25rem; font-size: 1.375rem; font-weight: 800; }
.text-muted   { color: var(--gray-600); font-size: .875rem; margin-bottom: 1.5rem; }

.dashboard-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap:                   1rem;
    margin-top:            1rem;
}
@keyframes card-up { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

.dashboard-card {
    background:      var(--white); border-radius: var(--radius-lg);
    padding:         1.625rem 1rem; text-align: center;
    box-shadow:      var(--shadow-sm); display: flex; flex-direction: column;
    align-items:     center; gap: .5rem; color: var(--gray-900);
    border:          1.5px solid transparent;
    transition:      transform var(--transition-md), box-shadow var(--transition-md), border-color var(--transition-md);
    text-decoration: none; animation: card-up .4s var(--ease-out) both;
}
.dashboard-card:nth-child(1) { animation-delay:.04s; }
.dashboard-card:nth-child(2) { animation-delay:.08s; }
.dashboard-card:nth-child(3) { animation-delay:.12s; }
.dashboard-card:nth-child(4) { animation-delay:.16s; }
.dashboard-card:nth-child(5) { animation-delay:.20s; }
.dashboard-card:nth-child(6) { animation-delay:.24s; }
.dashboard-card:nth-child(7) { animation-delay:.28s; }
.dashboard-card:nth-child(8) { animation-delay:.32s; }
.dashboard-card:nth-child(9) { animation-delay:.36s; }
.dashboard-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); text-decoration: none; }
.dashboard-card:active { transform: scale(.97); }
.card-icon  { font-size: 2.5rem; line-height: 1; }
.card-label { font-weight: 700; font-size: .875rem; }

/* ────────────────────────────────────────────────────────────
   TABLES
   ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; background: var(--white); }
th, td { padding: .625rem .875rem; text-align: left; border-bottom: 1px solid var(--gray-200); font-size: .875rem; }
th { background: var(--gray-50); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover td { background: #fff8f3; }
.table-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.data-table th, .data-table td { padding: .6875rem .9rem; font-size: .875rem; }
.data-table th { background: var(--gray-50); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
.data-table td { border-bottom: 1px solid var(--gray-100); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #fff8f3; }
.tfoot-total th { background: var(--gray-100); font-weight: 800; border-top: 2px solid var(--gray-300) !important; font-size: .875rem; border-bottom: none; }
.right, td.right, th.right { text-align: right; }
.font-mono { font-family: 'SFMono-Regular', Consolas, 'Courier New', monospace; font-size: .875rem; }
.actions-cell { white-space: nowrap; }

/* ────────────────────────────────────────────────────────────
   CARDS
   ──────────────────────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.375rem; margin-bottom: 1.25rem; border: 1px solid var(--border); transition: box-shadow var(--transition-md); }
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--gray-200); gap: .75rem; }
.card-title  { font-size: 1.05rem; font-weight: 700; }

/* ────────────────────────────────────────────────────────────
   BADGES
   ──────────────────────────────────────────────────────────── */
.badge  { display: inline-flex; align-items: center; padding: .22rem .65rem; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap; gap: .3rem; }
.badge-success { background: var(--success-lt); color: var(--success); }
.badge-danger  { background: var(--danger-lt);  color: var(--danger); }
.badge-warning { background: var(--warning-lt); color: var(--warning); }
.badge-info    { background: var(--info-lt);    color: var(--info); }
.badge-gray    { background: var(--gray-200);   color: var(--gray-700); }
.badge-neutral { background: var(--gray-200);   color: var(--gray-700); }
.badge-open  { background: #fff3e0; color: #e65100; border: 1px solid rgba(230,81,0,.35); }
.badge-sent  { background: #e3f2fd; color: #0277bd; border: 1px solid rgba(2,119,189,.35); }
.badge-ready { background: #e8f5e9; color: #2e7d32; border: 1px solid rgba(46,125,50,.35); }
.badge-paid  { background: #f3e5f5; color: #6a1b9a; border: 1px solid rgba(106,27,154,.35); }
.status-label { font-size: .82rem; font-weight: 700; padding: .25rem .7rem; border-radius: var(--radius-sm); }
.status-open  { background: #fff3e0; color: #e65100; }
.status-sent  { background: #e3f2fd; color: #0277bd; }
.status-ready { background: #e8f5e9; color: #2e7d32; }
.status-paid  { background: #f3e5f5; color: #6a1b9a; }

/* ────────────────────────────────────────────────────────────
   POS — Order List (pos/index.php)
   ──────────────────────────────────────────────────────────── */
.pos-index { padding: 1.25rem; max-width: 1100px; margin: 0 auto; }
.pos-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.pos-header-title { font-size: 1.25rem; font-weight: 800; }
.pos-header-sub   { font-size: .875rem; color: var(--gray-600); margin-top: .15rem; }

.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.order-card {
    display:         flex; flex-direction: column; gap: .5rem;
    background:      var(--white); border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
    padding:         1rem 1.125rem 1rem 1.375rem;
    text-decoration: none; color: inherit;
    transition:      box-shadow var(--transition-md), border-color var(--transition-md), transform var(--transition-md);
    position:        relative; overflow: hidden; animation: card-up .35s var(--ease-out) both;
}
.order-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; transition: width var(--transition); }
.order-card.status-open::before  { background: var(--warning); }
.order-card.status-sent::before  { background: var(--info); }
.order-card.status-ready::before { background: var(--success); }
.order-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-4px); text-decoration: none; }
.order-card:hover::before { width: 7px; }
.order-card:active { transform: scale(.98); }
.order-card-head  { display: flex; justify-content: space-between; align-items: center; }
.order-id         { font-weight: 800; font-size: 1.1rem; }
.order-type-label { font-size: .925rem; font-weight: 600; }
.order-scheduled  { font-size: .78rem; color: var(--warning); font-weight: 700; background: var(--warning-lt); padding: .12rem .45rem; border-radius: var(--radius-sm); display: inline-block; }
.order-total { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.order-meta  { font-size: .76rem; color: var(--gray-500); }
.pos-empty-state { text-align: center; padding: 5rem 1rem; color: var(--gray-500); }
.pos-empty-state .empty-icon { font-size: 4rem; margin-bottom: 1rem; opacity: .45; }
.pos-empty-state p { font-size: 1.05rem; margin-bottom: 1.25rem; }

/* ────────────────────────────────────────────────────────────
   POS — Workspace
   ──────────────────────────────────────────────────────────── */
.pos-workspace { display: flex; flex-direction: column; height: calc(100vh - var(--nav-height)); overflow: hidden; background: var(--gray-100); }
.pos-topbar { display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem; background: var(--white); border-bottom: 2px solid var(--gray-200); flex-shrink: 0; min-height: 50px; flex-wrap: wrap; }
.pos-order-info { flex: 1; font-size: .9rem; font-weight: 500; }
.scheduled-badge { background: var(--warning-lt); color: var(--warning); padding: .15rem .5rem; border-radius: var(--radius-sm); font-size: .78rem; font-weight: 700; border: 1px solid rgba(245,127,23,.3); }
.pos-columns { display: flex; flex: 1; overflow: hidden; }

/* Catalog */
.pos-catalog { flex: 1.8; display: flex; flex-direction: column; border-right: 2px solid var(--gray-200); overflow: hidden; background: var(--gray-50); }
.cat-tabs { display: flex; gap: .375rem; flex-wrap: nowrap; overflow-x: auto; padding: .625rem .875rem; background: var(--white); border-bottom: 1px solid var(--gray-200); flex-shrink: 0; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab { flex-shrink: 0; padding: .4rem 1rem; border: 2px solid var(--gray-300); border-radius: var(--radius-full); background: transparent; font-size: .8375rem; font-weight: 600; cursor: pointer; font-family: var(--font); color: var(--gray-700); transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition); white-space: nowrap; touch-action: manipulation; }
.cat-tab:hover  { border-color: var(--primary); color: var(--primary); }
.cat-tab:active { transform: scale(.95); }
.cat-tab.active { background: var(--primary); border-color: var(--primary); color: var(--white); box-shadow: 0 2px 8px rgba(230,81,0,.3); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .625rem; padding: .875rem; overflow-y: auto; flex: 1; }
.product-grid::-webkit-scrollbar { width: 5px; }
.product-grid::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

.product-card {
    display:         flex; flex-direction: column; align-items: center;
    justify-content: space-between; gap: .35rem;
    padding:         .875rem .625rem;
    border:          2px solid var(--gray-200); border-radius: var(--radius-lg);
    background:      var(--white); cursor: pointer;
    transition:      background var(--transition), border-color var(--transition),
                     transform var(--transition-md), box-shadow var(--transition-md);
    text-align:      center; font-family: var(--font);
    min-height:      90px; touch-action: manipulation; position: relative; overflow: hidden;
}
.product-card:hover:not(:disabled) { background: var(--primary-lt); border-color: var(--primary); transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow); }
.product-card:active:not(:disabled) { transform: scale(.96); box-shadow: none; }
.product-card:disabled, .product-disabled { opacity: .45; cursor: not-allowed; }
.product-name  { font-weight: 600; font-size: .875rem; line-height: 1.25; }
.product-price { font-size: .9375rem; font-weight: 800; color: var(--primary); }

/* Order panel */
.pos-order-panel { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--white); min-width: 280px; max-width: 355px; }
.order-items-list { flex: 1; overflow-y: auto; padding: .625rem .875rem; }
.order-items-list::-webkit-scrollbar { width: 4px; }
.order-items-list::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 2px; }
.empty-msg { color: var(--gray-500); font-size: .875rem; text-align: center; padding: 1.5rem .5rem; }

.order-item-row { border-bottom: 1px solid var(--gray-100); padding: .5rem 0; animation: card-up .2s var(--ease-out) both; }
.order-item-row:last-child { border-bottom: none; }
.item-main     { display: flex; align-items: center; gap: .5rem; }
.item-qty      { font-weight: 700; color: var(--gray-500); min-width: 26px; font-size: .875rem; }
.item-name     { flex: 1; font-size: .9rem; }
.item-subtotal { font-weight: 700; color: var(--gray-800); white-space: nowrap; font-size: .9rem; }
.item-note-display  { font-size: .76rem; color: var(--info);      padding-left: 1.5rem; margin-top: .12rem; }
.item-status-badge  { font-size: .75rem; color: var(--gray-500);  padding-left: 1.5rem; margin-top: .12rem; font-style: italic; }
.item-actions       { display: flex; align-items: center; gap: .3rem; margin-top: .375rem; padding-left: 1.5rem; }
.item-in_progress .item-name { color: var(--info); }
.item-ready   .item-name     { color: var(--success); }
.item-served  .item-name     { text-decoration: line-through; color: var(--gray-400); }

.qty-form  { display: flex; align-items: center; gap: .25rem; }
.qty-btn   { width: 30px; height: 30px; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--gray-100); cursor: pointer; font-size: 1rem; font-weight: 700; padding: 0; color: var(--gray-700); transition: background var(--transition), border-color var(--transition); display: flex; align-items: center; justify-content: center; font-family: var(--font); touch-action: manipulation; }
.qty-btn:hover  { background: var(--gray-300); border-color: var(--gray-400); }
.qty-btn:active { transform: scale(.9); }
.qty-input { width: 44px; text-align: center; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); padding: 4px; font-size: .875rem; font-family: var(--font); }
.note-form-wrap { padding: .375rem 0 .2rem 1.5rem; }
.note-row { display: flex; gap: .4rem; align-items: center; }
.note-row .form-control { flex: 1; padding: .375rem .625rem; font-size: .875rem; }

/* Order totals */
.order-totals { border-top: 2px solid var(--gray-200); padding: .875rem 1rem; background: var(--gray-50); flex-shrink: 0; }
.totals-row   { display: flex; justify-content: space-between; font-size: .9rem; padding: .15rem 0; color: var(--gray-700); }
.totals-total { font-weight: 800; font-size: 1.3rem; color: var(--gray-900); border-top: 1.5px solid var(--gray-300); margin-top: .4rem; padding-top: .5rem; }
.totals-grand { font-weight: 800; font-size: 1.35rem; color: var(--gray-900); border-top: 1.5px solid var(--gray-300); margin-top: .4rem; padding-top: .5rem; }

/* Action bar */
.order-action-bar { padding: .875rem 1rem; flex-shrink: 0; background: var(--white); border-top: 2px solid var(--gray-200); display: flex; flex-direction: column; gap: .5rem; }
.btn-kitchen {
    width: 100%; justify-content: center; display: flex; align-items: center; gap: .6rem;
    font-size: 1rem; padding: .875rem 1rem;
    background: var(--success); color: var(--white);
    border: none; border-radius: var(--radius);
    cursor: pointer; font-family: var(--font); font-weight: 700;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    letter-spacing: .01em; position: relative; overflow: hidden; touch-action: manipulation;
}
.btn-kitchen:hover:not(:disabled) { background: #1b5e20; box-shadow: 0 4px 12px rgba(46,125,50,.35); }
.btn-kitchen:active:not(:disabled) { transform: scale(.97); box-shadow: none; }
.btn-kitchen:disabled { opacity: .45; cursor: not-allowed; }
.pending-badge { background: rgba(255,255,255,.28); border-radius: var(--radius-full); min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; }
.btn-pay-link { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .875rem 1rem; border-radius: var(--radius); background: #1565c0; color: var(--white); font-weight: 700; font-size: 1rem; text-decoration: none; transition: background var(--transition), box-shadow var(--transition); letter-spacing: .01em; position: relative; overflow: hidden; }
.btn-pay-link:hover { background: #0d47a1; text-decoration: none; box-shadow: 0 4px 12px rgba(21,101,192,.35); }
.order-closed-msg { text-align: center; color: var(--gray-600); font-size: .875rem; padding: .375rem 0; }

/* ── Mobile POS tab bar ──────────────────────────────────── */
.pos-tab-bar { display: none; flex-shrink: 0; background: var(--white); border-top: 2px solid var(--gray-200); box-shadow: var(--shadow-up); }
.pos-tab-bar button { flex: 1; padding: .625rem .25rem; border: none; background: transparent; font-size: .72rem; font-weight: 600; color: var(--gray-600); cursor: pointer; font-family: var(--font); display: flex; flex-direction: column; align-items: center; gap: 3px; transition: color var(--transition), background var(--transition); touch-action: manipulation; border-top: 2px solid transparent; }
.pos-tab-bar button .tab-icon { font-size: 1.25rem; line-height: 1; }
.pos-tab-bar button.active { color: var(--primary); border-top-color: var(--primary); }
.pos-tab-bar button:hover  { background: var(--gray-50); }

/* Add product dialog */
.add-dialog { border: none; border-radius: var(--radius-xl); padding: 1.5rem 1.75rem; box-shadow: var(--shadow-lg); min-width: 310px; max-width: 400px; width: 96%; animation: dlg-in .22s var(--ease-spring); }
@keyframes dlg-in { from { opacity:0; transform:scale(.9) translateY(12px); } to { opacity:1; transform:none; } }
.add-dialog::backdrop { background: rgba(0,0,0,.5); backdrop-filter: blur(3px); animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
.dlg-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .5rem; }
.dlg-header h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.dlg-close  { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--gray-500); padding: 0; line-height: 1; transition: color var(--transition), transform var(--transition); }
.dlg-close:hover { color: var(--gray-900); transform: rotate(90deg); }
.dlg-price  { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: .25rem; }
.dlg-qty-row { display: flex; align-items: center; gap: .5rem; }
.dlg-qty-row .qty-input { width: 70px; font-size: 1.1rem; padding: .4rem .5rem; }
.dlg-qty-row .qty-btn   { width: 42px; height: 42px; font-size: 1.25rem; border-radius: var(--radius); }

/* ────────────────────────────────────────────────────────────
   POS — Pay Page
   ──────────────────────────────────────────────────────────── */
.pay-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 900px; margin: 0 auto; padding-bottom: 1.5rem; }
.pay-summary h2, .pay-form h2 { font-size: 1.05rem; font-weight: 700; }
.pay-items-tbl { width: 100%; border-collapse: collapse; font-size: .875rem; margin-bottom: .875rem; }
.pay-items-tbl th, .pay-items-tbl td { padding: .4rem .25rem; }
.pay-items-tbl th { font-size: .76rem; color: var(--gray-500); text-transform: uppercase; border-bottom: 1px solid var(--gray-200); padding-bottom: .35rem; }
.pay-items-tbl td { border-bottom: 1px solid var(--gray-100); }
.pay-items-tbl tr:last-child td { border-bottom: none; }
.tl { text-align: left; } .tr { text-align: right; }
.pay-totals { border-top: 2px solid var(--gray-200); padding-top: .5rem; }
.item-note-small { font-size: .75rem; color: var(--info); margin-top: .1rem; }

.method-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.method-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem; padding: .75rem .875rem; border: 2px solid var(--gray-300); border-radius: var(--radius); cursor: pointer; font-size: .9rem; font-weight: 600; font-family: var(--font); background: var(--white); color: var(--gray-700); transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition); white-space: nowrap; touch-action: manipulation; }
.method-btn input[type=radio] { display: none; }
.method-btn:hover  { border-color: var(--primary); transform: translateY(-1px); }
.method-btn:active { transform: scale(.97); }
.method-btn.active { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }

.tendered-row { display: flex; align-items: center; gap: .375rem; }
.sym-prefix   { font-size: 1.1rem; font-weight: 700; color: var(--gray-600); }
.quick-amounts { display: flex; gap: .375rem; flex-wrap: wrap; margin-top: .5rem; }
.quick-btn { padding: .35rem .75rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm); background: var(--gray-100); cursor: pointer; font-size: .8125rem; font-weight: 600; font-family: var(--font); transition: background var(--transition), border-color var(--transition), transform var(--transition); color: var(--gray-800); touch-action: manipulation; }
.quick-btn:hover  { background: var(--primary-lt); border-color: var(--primary); }
.quick-btn:active { transform: scale(.93); }
.change-display { text-align: center; padding: 1rem; border-radius: var(--radius-lg); background: var(--success-lt); border: 2px solid rgba(46,125,50,.3); animation: card-up .3s var(--ease-spring); }
.change-label  { font-size: .8125rem; color: var(--success); font-weight: 600; }
.change-amount { font-size: 2.5rem; font-weight: 800; color: var(--success); }

/* ────────────────────────────────────────────────────────────
   UTILITIES
   ──────────────────────────────────────────────────────────── */
.text-right { text-align: right; }  .text-center { text-align: center; } .text-left { text-align: left; }
.font-bold   { font-weight: 700; }
.text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; }
.text-muted2 { color: var(--gray-600); }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }  .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.flex-1 { flex: 1; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.section-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); margin-bottom: .625rem; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info)    !important; }

/* ────────────────────────────────────────────────────────────
   80mm TICKET PRINT
   ──────────────────────────────────────────────────────────── */
@media print {
    body * { visibility: hidden; }
    .ticket-print, .ticket-print * { visibility: visible; }
    .ticket-print { position: absolute; left: 0; top: 0; width: 80mm; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.4; }
    .ticket-print .divider { border-top: 1px dashed #000; margin: 4px 0; }
    .ticket-print .center  { text-align: center; }
    .ticket-print .bold    { font-weight: bold; }
    .ticket-print table    { width: 100%; }
    .ticket-print td       { padding: 1px 2px; }
    .main-nav, .main-footer, .no-print { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   ADMIN / FINANCE / REPORTS
   ════════════════════════════════════════════════════════════ */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; gap: .875rem; flex-wrap: wrap; }
.page-header h2 { font-size: 1.3rem; font-weight: 800; margin: 0; }
.page-header-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.admin-page { max-width: var(--content-max); }

.filter-form { display: flex; align-items: flex-end; gap: .875rem; flex-wrap: wrap; margin-bottom: 1.5rem; background: var(--white); padding: .875rem 1.125rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); border: 1px solid var(--border); }
.filter-group { display: flex; flex-direction: column; gap: .3rem; }
.filter-group label { font-size: .8125rem; font-weight: 600; color: var(--gray-700); }
.filter-group select,
.filter-group input[type=date] { border: 1.5px solid var(--gray-300); border-radius: var(--radius); padding: .45rem .75rem; font-size: .9rem; font-family: var(--font); background: var(--white); color: var(--gray-900); transition: border-color var(--transition), box-shadow var(--transition); }
.filter-group select:focus,
.filter-group input[type=date]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,81,0,.12); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--white); border-radius: var(--radius-lg); padding: 1.375rem 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); position: relative; overflow: hidden; transition: box-shadow var(--transition-md), transform var(--transition-md); animation: card-up .4s var(--ease-out) both; }
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gray-300); }
.stat-sales::before    { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.stat-expenses::before { background: var(--danger); }
.stat-profit::before   { background: var(--success); }
.stat-loss::before     { background: var(--warning); }
.stat-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); font-weight: 700; margin-bottom: .5rem; }
.stat-value { font-size: 1.875rem; font-weight: 800; color: var(--gray-900); line-height: 1.1; }
.stat-sub   { font-size: .875rem; color: var(--gray-500); margin-top: .35rem; font-weight: 600; }

.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.875rem 2.125rem; max-width: 660px; box-shadow: var(--shadow-sm); }
.form-card .form-actions { margin-top: 1.5rem; display: flex; gap: .625rem; align-items: center; flex-wrap: wrap; }

.finance-page { max-width: 1100px; }
.finance-period-title { font-size: 1.0625rem; font-weight: 700; color: var(--gray-700); margin-bottom: 1.25rem; padding: .5rem .875rem; background: var(--primary-lt); border-left: 3px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.finance-breakdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
.breakdown-section { background: var(--white); border-radius: var(--radius-lg); padding: 1.25rem 1.375rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: box-shadow var(--transition-md); }
.breakdown-section:hover { box-shadow: var(--shadow); }
.breakdown-section h4 { font-size: .9375rem; font-weight: 700; margin-bottom: 1rem; color: var(--gray-800); display: flex; align-items: center; gap: .5rem; }
.breakdown-section h4::before { content: ''; display: inline-block; width: 4px; height: 16px; background: var(--primary); border-radius: var(--radius-full); }
.breakdown-table { box-shadow: none; border: none; }
.breakdown-table th, .breakdown-table td { padding: .5rem .5rem; }
.finance-actions { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--gray-200); }

.reports-page { max-width: 1060px; }
.report-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 1.125rem; margin-top: .5rem; }
.report-card { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: 1.625rem 1.375rem; color: inherit; text-decoration: none; transition: box-shadow var(--transition-md), border-color var(--transition-md), transform var(--transition-md); animation: card-up .4s var(--ease-out) both; }
.report-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-4px); text-decoration: none; }
.report-card-icon  { font-size: 2.25rem; line-height: 1; }
.report-card-title { font-weight: 800; font-size: 1.0625rem; }
.report-card-desc  { font-size: .85rem; color: var(--gray-600); line-height: 1.5; }

.cut-methods-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.method-box { flex: 1; min-width: 135px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.125rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: var(--shadow-xs); transition: box-shadow var(--transition-md); }
.method-box:hover { box-shadow: var(--shadow); }
.method-label { font-size: .75rem; color: var(--gray-500); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.method-value { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }

.badge-audit { background: #e8eaf6; color: #3949ab; font-family: monospace; font-size: .72rem; padding: .2rem .55rem; border-radius: var(--radius-sm); letter-spacing: .02em; }
.audit-reason  { font-size: .8rem; color: var(--gray-700); display: block; }
.audit-details summary { cursor: pointer; font-size: .8rem; color: var(--info); margin-top: .2rem; user-select: none; transition: color var(--transition); }
.audit-details summary:hover { color: var(--primary); }
.audit-json { font-size: .75rem; background: var(--gray-100); border: 1px solid var(--gray-200); padding: .5rem .625rem; border-radius: var(--radius-sm); overflow-x: auto; margin-top: .35rem; max-height: 180px; overflow-y: auto; line-height: 1.5; }
.pagination { display: flex; align-items: center; gap: .75rem; margin-top: 1.25rem; font-size: .875rem; color: var(--gray-600); }
.audit-table { font-size: .83rem; }

.settings-form { max-width: 800px; }
.settings-section { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem 1.625rem; margin-bottom: 1.375rem; background: var(--white); box-shadow: var(--shadow-xs); transition: box-shadow var(--transition-md); }
.settings-section:hover { box-shadow: var(--shadow-sm); }
.settings-section legend { font-weight: 700; padding: 0 .5rem; color: var(--primary); font-size: .975rem; }

.tools-page { max-width: 880px; }
.tools-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.625rem 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-xs); transition: box-shadow var(--transition-md); }
.tools-card:hover { box-shadow: var(--shadow-sm); }
.tools-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .875rem; color: var(--primary); border-bottom: 1px solid var(--gray-200); padding-bottom: .625rem; display: flex; align-items: center; gap: .5rem; }
.export-form { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.export-form .filter-group label { display: block; font-size: .8125rem; margin-bottom: .25rem; }
.tools-hint { margin-top: 1rem; }
.tools-hint summary { cursor: pointer; color: var(--primary); font-size: .875rem; font-weight: 600; }
.tools-hint ul { margin: .5rem 0 0 1.25rem; font-size: .875rem; color: var(--gray-600); line-height: 1.7; }
.tools-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 1rem; margin-top: .75rem; }
.doc-card { display: flex; gap: .875rem; align-items: flex-start; border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.125rem; text-decoration: none; color: inherit; transition: box-shadow var(--transition-md), border-color var(--transition-md), transform var(--transition-md); }
.doc-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.doc-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.doc-card strong { display: block; margin-bottom: .25rem; font-size: .9375rem; }
.doc-card p { font-size: .8375rem; color: var(--gray-600); margin: 0; line-height: 1.45; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
    .order-grid              { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
    .pos-order-panel         { max-width: none; min-width: 240px; }
    .product-grid            { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .finance-breakdown-grid  { grid-template-columns: 1fr; }
    .pay-container           { grid-template-columns: 1fr; }
}

/* Mobile (≤ 720px) */
@media (max-width: 720px) {
    :root { --nav-height: 54px; }
    .main-nav { padding: 0 1rem; }
    .nav-hamburger          { display: flex; }
    .main-nav > .nav-links  { display: none; }
    .nav-drawer             { display: block; }
    .main-content { padding: 1rem .875rem; }
    .auth-card    { padding: 1.875rem 1.375rem; }
    .dashboard-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
    .card-icon      { font-size: 2rem; }
    .stat-cards  { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .stat-value  { font-size: 1.5rem; }
    .order-grid  { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .625rem; }

    /* POS workspace mobile mode */
    .pos-columns { flex-direction: column; position: relative; }
    .pos-catalog {
        border-right: none; flex: none;
        position: absolute; inset: 0; z-index: 1;
        display: none;
    }
    .pos-order-panel {
        max-width: none; min-width: 0; width: 100%;
        position: absolute; inset: 0; z-index: 1;
        display: none;
    }
    .pos-catalog.pos-panel-active      { display: flex; }
    .pos-order-panel.pos-panel-active  { display: flex; }
    .pos-tab-bar { display: flex; position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; }
    .pos-workspace { position: relative; overflow: visible; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .5rem; padding: .625rem; }
    .product-card { min-height: 78px; padding: .625rem .5rem; }
    .product-name  { font-size: .8rem; }
    .product-price { font-size: .875rem; }
    .order-action-bar { padding: .625rem .875rem; }
    .btn-kitchen  { font-size: .9375rem; padding: .75rem; }
    .btn-pay-link { font-size: .9375rem; padding: .75rem; }
    .data-table th, .data-table td { padding: .5rem .625rem; }
    .data-table { font-size: .8rem; }
    .filter-form { flex-direction: column; }
    .filter-group           { width: 100%; }
    .filter-group select,
    .filter-group input[type=date] { width: 100%; }
    .page-header             { flex-direction: column; align-items: flex-start; }
    .page-header-actions     { width: 100%; }
    .form-card               { padding: 1.375rem 1.125rem; max-width: 100%; }
    .pay-container           { padding: .875rem; }
    .report-cards            { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .tools-doc-grid          { grid-template-columns: 1fr; }
    .settings-section        { padding: 1.125rem 1.25rem; }
    .cut-methods-row         { gap: .5rem; }
    .method-box              { min-width: 110px; padding: .75rem; }
    .method-value            { font-size: 1.1rem; }
}

/* Small mobile (≤ 480px) */
@media (max-width: 480px) {
    :root { font-size: 14px; }
    .main-content    { padding: .75rem; }
    .dashboard-grid  { grid-template-columns: repeat(3, 1fr); gap: .625rem; }
    .dashboard-card  { padding: 1.125rem .625rem; }
    .card-icon       { font-size: 1.75rem; }
    .card-label      { font-size: .78rem; }
    .stat-cards      { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
    .stat-value      { font-size: 1.375rem; }
    .stat-card       { padding: 1rem 1.125rem; }
    .order-grid      { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
    .report-cards    { grid-template-columns: 1fr; }
    .btn             { padding: .5rem .875rem; font-size: .875rem; }
    .btn-lg          { padding: .6875rem 1.25rem; font-size: .9375rem; }
    .add-dialog      { padding: 1.25rem 1.375rem; min-width: 0; width: 94%; }
    .dlg-qty-row .qty-btn { width: 46px; height: 46px; }
    .method-btns     { flex-direction: column; }
    .method-btn      { flex: none; }
    .pos-topbar      { padding: .375rem .625rem; gap: .5rem; }
    .pos-order-info  { font-size: .8rem; }
    .auth-card       { padding: 1.5rem 1.125rem; }
    .auth-logo       { font-size: 1.25rem; }
}

/* Landscape phone */
@media (max-width: 720px) and (orientation: landscape) {
    :root { --nav-height: 44px; }
    .pos-workspace { height: calc(100vh - var(--nav-height)); }
}

/* Large screens */
@media (min-width: 1280px) {
    .product-grid    { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
    .pos-order-panel { max-width: 380px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: .01ms !important; transition-duration: .01ms !important; }
}

/* Touch: larger tap targets */
@media (pointer: coarse) {
    .btn, button[type=submit] { min-height: 44px; }
    .btn-sm       { min-height: 38px; }
    .cat-tab      { min-height: 40px; }
    .qty-btn      { width: 38px; height: 38px; }
    .nav-links a  { min-height: 40px; }
    .method-btn   { min-height: 52px; }
    .quick-btn    { min-height: 44px; min-width: 60px; }
    .toggle-label input[type=checkbox] { width: 1.35rem; height: 1.35rem; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Focus ring */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
