/* 
  MARTABAK YAPIA FM - MODERN POS, ADMIN DASHBOARD & FRONT-END SYSTEM
  Design Theme: Gourmet Dark Gold & Obsidian Glassmorphism
  Updated with: Multi-Cabang Sales Leaderboard & Multi-Admin Creator
*/

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

:root {
  /* Color Palette */
  --bg-main: #0c0e14;
  --bg-sidebar: #12151e;
  --bg-surface: #181c28;
  --bg-surface-elevated: #222636;
  --bg-surface-hover: #2a3044;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-active: rgba(245, 158, 11, 0.4);

  --primary-gold: #f59e0b;
  --primary-gold-light: #fbbf24;
  --primary-gold-glow: rgba(245, 158, 11, 0.25);
  --primary-amber-dark: #b45309;

  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.25);
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.25);
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dark: #64748b;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Shadow & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 8px 24px rgba(245, 158, 11, 0.25);

  --transition-fast: 0.18s ease;
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-gold); }

/* App Shell */
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* Top Header */
.top-header {
  height: 68px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 50;
  flex-shrink: 0;
  gap: 14px;
}

.brand-section { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand-logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  box-shadow: var(--shadow-gold);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #fbbf24);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.1;
}
.brand-tagline { font-size: 11px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.live-badge {
  display: inline-block; width: 7px; height: 7px; background-color: var(--accent-green);
  border-radius: 50%; box-shadow: 0 0 8px var(--accent-green); animation: pulse-live 2s infinite;
}
@keyframes pulse-live { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.6; } 100% { transform: scale(1); opacity: 1; } }

.branch-select-wrap { display: flex; align-items: center; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 2px 8px; }
.branch-select-wrap.hidden { display: none !important; }
.branch-select-dropdown {
  background: transparent; border: none; color: var(--primary-gold-light); font-family: var(--font-display);
  font-weight: 700; font-size: 12px; outline: none; cursor: pointer; padding: 6px 4px;
}
.branch-select-dropdown option { background: #181c28; color: white; }

.view-switcher {
  display: flex; align-items: center; background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: 99px; padding: 3px; gap: 3px;
}
.switch-nav-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px;
  font-family: var(--font-display); font-weight: 600; font-size: 12px; color: var(--text-muted);
  border: none; background: transparent; cursor: pointer; transition: var(--transition-fast);
}
.switch-nav-btn:hover { color: var(--text-main); }
.switch-nav-btn.active {
  background: linear-gradient(135deg, var(--primary-gold), #d97706); color: #111; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.scanner-status-chip {
  display: flex; align-items: center; gap: 6px; background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3); color: var(--accent-green); font-size: 11px;
  font-weight: 700; padding: 5px 10px; border-radius: 99px; cursor: pointer;
}
.scanner-status-chip:hover { background: rgba(16, 185, 129, 0.2); }
.scanner-dot { width: 6px; height: 6px; background: var(--accent-green); border-radius: 50%; box-shadow: 0 0 6px var(--accent-green); }

.user-session-chip {
  display: flex; align-items: center; gap: 8px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: 99px; padding: 4px 10px;
}
.user-avatar { font-size: 16px; }
.user-text-col { display: flex; flex-direction: column; }
.user-name { font-size: 11px; font-weight: 700; color: var(--text-main); }
.user-role { font-size: 8.5px; font-weight: 800; letter-spacing: 0.5px; }
.role-superadmin { color: var(--primary-gold-light); }
.role-branchadmin { color: #60a5fa; }
.role-kasir { color: var(--accent-green); }

.btn-logout-icon { background: transparent; border: none; color: var(--text-muted); cursor: pointer; padding: 2px; display: flex; align-items: center; }
.btn-logout-icon:hover { color: var(--accent-red); }
.btn-header-login { padding: 6px 12px; font-size: 11px; border-radius: 99px; }

.header-meta { display: flex; align-items: center; gap: 10px; }
.live-datetime { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; }
.live-clock { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--primary-gold-light); }
.live-date { color: var(--text-muted); font-size: 10px; }

.header-action-btn {
  background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-muted);
  width: 34px; height: 34px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.header-action-btn:hover { color: var(--primary-gold); border-color: var(--border-active); }

/* Main Wrapper */
.main-view-wrapper { flex: 1; display: flex; overflow: hidden; position: relative; min-height: 0; }

/* Front-End View */
.frontend-container { width: 100%; height: 100%; overflow-y: auto; background-color: var(--bg-main); padding-bottom: 60px; }
.fe-hero {
  position: relative; padding: 48px 32px 36px;
  background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.fe-hero-badge {
  display: inline-flex; align-items: center; gap: 6px; background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4); color: var(--primary-gold-light); font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 99px;
}
.fe-hero-title {
  font-family: var(--font-display); font-size: 38px; font-weight: 900; letter-spacing: -1px; line-height: 1.15; max-width: 780px;
  background: linear-gradient(to right, #ffffff, #fde047, #f59e0b); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.fe-hero-desc { font-size: 14px; color: var(--text-muted); max-width: 600px; line-height: 1.5; }
.fe-hero-cta-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.fe-btn-cta {
  background: linear-gradient(135deg, var(--primary-gold), #d97706); border: none; border-radius: 99px; color: #111;
  font-family: var(--font-display); font-size: 14px; font-weight: 800; padding: 12px 28px; cursor: pointer; box-shadow: 0 4px 20px var(--primary-gold-glow);
}

.fe-promo-section { max-width: 1180px; margin: 24px auto; padding: 0 24px; }
.fe-promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.fe-promo-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(22, 26, 38, 0.8));
  border: 1px dashed var(--border-active); border-radius: var(--radius-md); padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fe-promo-info { display: flex; flex-direction: column; }
.fe-promo-code { font-family: var(--font-mono); font-weight: 800; color: var(--primary-gold-light); font-size: 14px; }
.fe-promo-desc { font-size: 11px; color: var(--text-muted); }
.btn-copy-code { background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-main); font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.btn-copy-code:hover { background-color: var(--primary-gold); color: #111; }

.fe-menu-section { max-width: 1180px; margin: 32px auto; padding: 0 24px; }
.fe-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 14px; }
.fe-section-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.fe-cat-nav { display: flex; align-items: center; gap: 6px; overflow-x: auto; }
.fe-cat-btn {
  background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-muted);
  font-family: var(--font-display); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap;
}
.fe-cat-btn.active { background: var(--primary-gold); color: #111; font-weight: 700; }
.fe-menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.fe-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.fe-card:hover { transform: translateY(-4px); border-color: var(--border-active); box-shadow: var(--shadow-lg), 0 0 16px var(--primary-gold-glow); }
.fe-card-img-wrap { position: relative; width: 100%; height: 160px; overflow: hidden; background: #1a1e2b; }
.fe-card-img { width: 100%; height: 100%; object-fit: cover; }
.fe-card:hover .fe-card-img { transform: scale(1.06); }
.fe-badge {
  position: absolute; top: 10px; left: 10px; background: rgba(17, 24, 39, 0.9);
  backdrop-filter: blur(8px); border: 1px solid rgba(245, 158, 11, 0.4); color: var(--primary-gold-light); font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.fe-card-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.fe-card-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.fe-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fe-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.fe-price { font-family: var(--font-display); font-size: 16px; font-weight: 800; color: var(--primary-gold-light); }
.fe-btn-order-wa {
  background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #34d399; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer;
}
.fe-btn-order-wa:hover { background-color: var(--accent-green); color: #111; }

.fe-branches-section { max-width: 1180px; margin: 40px auto; padding: 0 24px; }
.fe-branches-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fe-branch-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.fe-branch-header { display: flex; align-items: center; gap: 10px; }
.fe-branch-icon { font-size: 24px; }
.fe-branch-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.fe-badge-open { font-size: 10px; color: var(--accent-green); font-weight: 600; }
.fe-branch-address { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.fe-branch-footer { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--border-subtle); }
.fe-branch-link { color: var(--primary-gold-light); font-size: 12px; font-weight: 700; text-decoration: none; }

/* ========================================================
   MULTI-CABANG SALES LEADERBOARD (CENTRAL DASHBOARD)
   ======================================================== */
.branch-leaderboard-container {
  margin-bottom: 24px;
}

.branch-leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.branch-rank-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: var(--transition-fast);
}

.branch-rank-card:hover {
  border-color: var(--border-active);
  transform: translateY(-2px);
}

.branch-rank-card.top-branch-card {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), var(--bg-surface));
}

.branch-rank-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.branch-medal {
  font-size: 24px;
}

.branch-rank-name {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
}

.branch-rank-revenue {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-gold-light);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.branch-rank-revenue small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.branch-progress-bar {
  width: 100%;
  height: 6px;
  background-color: var(--bg-surface-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 99px;
  transition: width 0.5s ease;
}

/* ========================================================
   LOGIN MODAL & PIN PAD
   ======================================================== */
.login-tabs-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background-color: var(--bg-surface-elevated);
  padding: 4px; border-radius: var(--radius-sm); margin-bottom: 18px;
}
.login-tab-btn {
  background: transparent; border: none; color: var(--text-muted); font-family: var(--font-display);
  font-size: 12px; font-weight: 700; padding: 7px; border-radius: 4px; cursor: pointer;
}
.login-tab-btn.active { background: var(--bg-surface); color: var(--primary-gold-light); }

.pin-pad-container { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pin-display-box {
  background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 12px 32px; font-family: var(--font-mono); font-size: 26px; letter-spacing: 10px; color: var(--primary-gold-light);
}
.pin-keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 240px; }
.btn-pin-key {
  height: 52px; border-radius: 50%; background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle);
  color: var(--text-main); font-family: var(--font-display); font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-pin-key:hover { background: var(--bg-surface-hover); border-color: var(--primary-gold); color: var(--primary-gold-light); }
.btn-pin-key.btn-pin-del { font-size: 14px; color: var(--accent-red); }

.quick-login-box { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border-subtle); }
.quick-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-quick-login {
  background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-main);
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; cursor: pointer; text-align: left; display: flex; flex-direction: column;
}
.btn-quick-login small { color: var(--text-muted); font-size: 9.5px; }

/* POS & Admin Layouts */
.pos-container { display: none; width: 100%; height: 100%; overflow: hidden; }
.pos-catalog-panel { flex: 1; display: flex; flex-direction: column; padding: 18px 24px; overflow-y: auto; gap: 16px; }
.pos-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.search-box-wrap { position: relative; flex: 1; min-width: 260px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.pos-search-input {
  width: 100%; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 99px;
  padding: 10px 16px 10px 42px; font-family: var(--font-body); font-size: 13.5px; color: var(--text-main); outline: none;
}
.pos-search-input:focus { border-color: var(--primary-gold); box-shadow: 0 0 0 3px var(--primary-gold-glow); background-color: var(--bg-surface-elevated); }

.category-pills-bar { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.category-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 99px; background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle); color: var(--text-muted); font-family: var(--font-display); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.category-pill.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25)); border-color: var(--primary-gold); color: var(--primary-gold-light);
}

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; padding-bottom: 24px; }
.product-card {
  background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer; transition: var(--transition-smooth); position: relative;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--border-active); box-shadow: var(--shadow-lg), 0 0 16px var(--primary-gold-glow); }
.product-card.out-of-stock { opacity: 0.55; filter: grayscale(0.6); cursor: not-allowed; }
.product-image-wrap { position: relative; width: 100%; height: 135px; overflow: hidden; background-color: #1a1e2b; }
.product-img { width: 100%; height: 100%; object-fit: cover; }
.product-card:hover .product-img { transform: scale(1.06); }
.product-badge {
  position: absolute; top: 8px; left: 8px; background: rgba(17, 24, 39, 0.9); backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.4); color: var(--primary-gold-light); font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.stock-badge {
  position: absolute; bottom: 8px; right: 8px; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(6px);
  font-size: 9.5px; color: var(--text-muted); padding: 2px 7px; border-radius: var(--radius-sm);
}
.stock-badge.stock-low { background-color: rgba(239, 68, 68, 0.9); color: white; font-weight: 700; }
.product-info { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; }
.product-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.product-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-bottom-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.product-price { font-family: var(--font-display); font-size: 15.5px; font-weight: 800; color: var(--primary-gold-light); }
.btn-add-item {
  width: 34px; height: 34px; border-radius: 50%; background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle);
  color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.btn-add-item:hover:not(:disabled) { background: var(--primary-gold); color: #111; transform: scale(1.1); }

.pos-cart-panel { width: 410px; background-color: var(--bg-sidebar); border-left: 1px solid var(--border-subtle); display: flex; flex-direction: column; flex-shrink: 0; height: 100%; }
.cart-header { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.cart-title-wrap { display: flex; align-items: center; gap: 8px; }
.cart-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.cart-counter-pill { background-color: var(--primary-gold); color: #111; font-weight: 800; font-size: 10px; padding: 2px 7px; border-radius: 99px; }
.btn-clear-cart { background: transparent; border: none; color: var(--accent-red); font-size: 11.5px; font-weight: 600; cursor: pointer; }

.order-setup-section { padding: 10px 18px; border-bottom: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 8px; background-color: rgba(0, 0, 0, 0.15); }
.order-type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background-color: var(--bg-surface); padding: 3px; border-radius: var(--radius-md); border: 1px solid var(--border-subtle); }
.order-type-btn { background: transparent; border: none; padding: 6px 4px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.order-type-btn.active { background-color: var(--bg-surface-elevated); color: var(--primary-gold-light); font-weight: 700; border: 1px solid var(--border-active); }
.customer-input { width: 100%; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 8px 12px; font-family: var(--font-body); font-size: 12px; color: var(--text-main); outline: none; }

.cart-items-scroll { flex: 1; overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; }
.cart-empty-state { text-align: center; padding: 35px 10px; color: var(--text-muted); }
.cart-empty-icon { font-size: 38px; margin-bottom: 6px; opacity: 0.6; }
.cart-item-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.cart-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cart-item-name { font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.btn-remove-cart { background: transparent; border: none; color: var(--text-muted); cursor: pointer; }
.btn-remove-cart:hover { color: var(--accent-red); }
.cart-item-variant { font-size: 11px; color: var(--primary-gold-light); font-weight: 600; }
.cart-item-toppings, .cart-item-note { font-size: 10.5px; color: var(--text-muted); }
.cart-item-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--border-subtle); }
.cart-qty-control { display: flex; align-items: center; gap: 6px; background-color: var(--bg-surface-elevated); border-radius: var(--radius-sm); padding: 2px 6px; }
.btn-qty { width: 20px; height: 20px; border-radius: 4px; background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-main); font-weight: 800; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; }
.qty-num { font-size: 12px; font-weight: 700; min-width: 18px; text-align: center; }
.cart-item-total { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--text-main); }

.cart-checkout-section { border-top: 1px solid var(--border-subtle); background-color: var(--bg-surface); padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.voucher-row { display: flex; gap: 6px; }
.voucher-input { flex: 1; background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 6px 10px; font-family: var(--font-body); font-size: 11px; color: var(--text-main); text-transform: uppercase; }
.btn-apply-voucher { background-color: var(--bg-surface-hover); border: 1px solid var(--border-subtle); color: var(--text-main); font-size: 11px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.summary-line-item { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); }
.grand-total-item { font-size: 15px; font-weight: 800; color: var(--text-main); border-top: 1px solid var(--border-subtle); padding-top: 6px; }
.grand-total-item .total-val { color: var(--primary-gold-light); font-family: var(--font-display); font-size: 17px; }

.payment-methods-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.payment-method-btn { background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-muted); font-size: 10px; font-weight: 600; cursor: pointer; }
.payment-method-btn.active { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3)); border-color: var(--primary-gold); color: var(--primary-gold-light); }
.payment-subpanel { background-color: var(--bg-surface-elevated); border-radius: var(--radius-md); padding: 10px; border: 1px solid var(--border-subtle); }
.quick-cash-row { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.quick-cash-chip { flex: 1; min-width: 54px; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-main); font-size: 9.5px; font-weight: 700; padding: 4px 2px; border-radius: 4px; cursor: pointer; text-align: center; }
.cash-input-field { width: 100%; background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 7px 10px; font-family: var(--font-mono); font-size: 14px; font-weight: 700; color: var(--text-main); outline: none; margin-bottom: 4px; }
.change-display-box { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }
.change-val { font-family: var(--font-mono); font-size: 14px; font-weight: 800; color: var(--accent-green); }
.qris-preview-box { display: flex; align-items: center; gap: 12px; }
.qris-qr-code { width: 72px; height: 72px; background: white; padding: 5px; border-radius: var(--radius-sm); }
.btn-checkout-action { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--primary-gold), #d97706); border: none; border-radius: var(--radius-md); font-family: var(--font-display); font-size: 15px; font-weight: 800; color: #111; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 16px var(--primary-gold-glow); }

/* Admin Sidebar & Main Content */
.admin-container { display: none; width: 100%; height: 100%; overflow: hidden; }
.admin-layout { display: flex; width: 100%; height: 100%; }
.admin-sidebar { width: 250px; background-color: var(--bg-sidebar); border-right: 1px solid var(--border-subtle); display: flex; flex-direction: column; flex-shrink: 0; padding: 18px 12px; }
.admin-sidebar-menu { display: flex; flex-direction: column; gap: 4px; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-md); color: var(--text-muted); font-family: var(--font-display); font-size: 13px; font-weight: 600; border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; }
.admin-nav-item.active { background-color: var(--bg-surface-elevated); border-color: var(--border-active); color: var(--primary-gold-light); }
.admin-sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-subtle); }

.admin-main-content { flex: 1; overflow-y: auto; padding: 22px 28px; background-color: var(--bg-main); }
.admin-tab-pane { display: none; flex-direction: column; gap: 20px; }
.admin-tab-pane.active { display: flex; }
.admin-pane-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-pane-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.admin-pane-subtitle { font-size: 12.5px; color: var(--text-muted); }
.admin-filter-group { display: flex; gap: 10px; }
.admin-date-picker, .admin-branch-select { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--text-main); padding: 7px 12px; font-family: var(--font-body); font-size: 12px; outline: none; }

.kpi-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 18px; position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary-gold), transparent); }
.kpi-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.kpi-icon-wrap { width: 32px; height: 32px; border-radius: var(--radius-sm); background-color: var(--bg-surface-elevated); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.kpi-value { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--text-main); line-height: 1.1; margin-bottom: 5px; }
.kpi-trend { font-size: 10.5px; display: flex; align-items: center; gap: 4px; font-weight: 600; }
.kpi-trend.trend-up { color: var(--accent-green); }

.charts-grid-row { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.chart-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chart-card-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.svg-chart-responsive { width: 100%; height: 200px; }
.chart-bar { fill: url(#barGoldGrad); cursor: pointer; }
.chart-bar:hover { fill: #fde047; }
.chart-label { fill: var(--text-muted); font-family: var(--font-mono); font-size: 10px; }

.donut-layout { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.donut-center-title { fill: var(--text-main); font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.donut-center-sub { fill: var(--text-muted); font-size: 9.5px; }
.chart-legend-col { display: flex; flex-direction: column; gap: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-name { color: var(--text-muted); min-width: 100px; }
.legend-val { font-weight: 700; color: var(--text-main); }

.payment-stat-bars { display: flex; flex-direction: column; gap: 12px; }
.payment-bar-item { display: flex; flex-direction: column; gap: 5px; }
.bar-header { display: flex; justify-content: space-between; font-size: 11.5px; }
.bar-track { width: 100%; height: 7px; background-color: var(--bg-surface-elevated); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; }
.bg-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bg-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.bg-indigo { background: linear-gradient(90deg, #6366f1, #818cf8); }

/* Table Styles */
.table-container-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; }
.table-toolbar { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.table-search-input { background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: 99px; padding: 7px 14px; font-family: var(--font-body); font-size: 12.5px; color: var(--text-main); outline: none; min-width: 220px; }
.btn-primary-action { background: linear-gradient(135deg, var(--primary-gold), #d97706); border: none; border-radius: var(--radius-sm); color: #111; font-family: var(--font-display); font-size: 12.5px; font-weight: 700; padding: 8px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-outline-action { background: transparent; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--text-main); font-size: 12px; font-weight: 600; padding: 7px 14px; cursor: pointer; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12.5px; }
.data-table th { background-color: rgba(0, 0, 0, 0.2); color: var(--text-muted); font-weight: 700; font-size: 10.5px; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
.data-table tr:hover td { background-color: rgba(255, 255, 255, 0.02); }
.data-table tr.row-void td { opacity: 0.45; text-decoration: line-through; }
.table-thumb { width: 42px; height: 42px; border-radius: var(--radius-sm); object-fit: cover; }
.prod-id-tag { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); }
.prod-name-title { font-family: var(--font-display); font-size: 13.5px; }
.barcode-tag { font-family: var(--font-mono); font-size: 10px; color: var(--primary-gold-light); display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.badge-mini { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: var(--bg-surface-elevated); color: var(--primary-gold-light); margin-left: 4px; }
.cat-tag { font-size: 9.5px; font-weight: 700; padding: 3px 7px; border-radius: 4px; }
.cat-manis { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.cat-telur { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.cat-tipker { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.cat-minuman { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.stock-editor { display: flex; align-items: center; gap: 5px; }
.btn-stock-adj { background: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); color: var(--text-muted); border-radius: 4px; padding: 2px 5px; font-size: 9.5px; cursor: pointer; }
.status-pill { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.status-active { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.status-out { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.payment-badge { font-size: 9.5px; font-weight: 800; padding: 2px 6px; border-radius: 4px; }
.badge-tunai { background: rgba(245, 158, 11, 0.15); color: var(--primary-gold-light); }
.badge-qris { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.badge-debit { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.status-badge { font-size: 10.5px; font-weight: 700; }
.badge-success { color: var(--accent-green); }
.badge-danger { color: var(--accent-red); }
.btn-icon, .btn-action-icon { background: transparent; border: none; font-size: 14px; cursor: pointer; padding: 5px; border-radius: var(--radius-sm); }
.btn-icon:hover, .btn-action-icon:hover { background-color: var(--bg-surface-elevated); }

.btn-action-reprint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--primary-gold-light);
  border: 1px solid rgba(245, 158, 11, 0.45);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.btn-action-reprint:hover {
  background: var(--primary-gold);
  color: #111;
  border-color: var(--primary-gold);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.btn-action-reprint:active {
  transform: translateY(0);
}

.receipt-reprint-badge {
  text-align: center;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 4px 0;
  margin: 6px 0;
  border-top: 1px dashed #111111;
  border-bottom: 1px dashed #111111;
  color: #111111;
  text-transform: uppercase;
  background: #f1f1f1;
}

.pos-history-filter-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 99px;
  transition: all 0.2s ease;
}
.pos-history-filter-btn.active {
  background: linear-gradient(135deg, var(--primary-gold), #d97706);
  color: #111;
  border-color: var(--primary-gold-light);
  font-weight: 700;
  box-shadow: 0 2px 8px var(--primary-gold-glow);
}
.trx-items-preview {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.shift-grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shift-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.shift-card-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.shift-metrics-list { display: flex; flex-direction: column; gap: 8px; }
.shift-metric-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 12.5px; }
.shift-metric-item.highlight-box { background: rgba(245, 158, 11, 0.08); border: 1px dashed var(--primary-gold); border-radius: var(--radius-sm); padding: 10px 12px; }
.expense-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); font-size: 11.5px; }
.badge-time { background: var(--bg-surface-elevated); padding: 2px 5px; border-radius: 4px; font-family: var(--font-mono); font-size: 9.5px; margin-right: 5px; }
.diff-summary-card { background: var(--bg-surface-elevated); border-radius: var(--radius-md); padding: 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }

.settings-card { background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 20px; max-width: 650px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }
.form-control { width: 100%; background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 9px 12px; font-family: var(--font-body); font-size: 12.5px; color: var(--text-main); outline: none; }
.form-control:focus { border-color: var(--primary-gold); }
.checkbox-toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; }

/* Password Input with Eye Visibility Toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-input-wrap .form-control {
  padding-right: 42px;
}
.btn-toggle-pwd {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}
.btn-toggle-pwd:hover {
  color: var(--primary-gold-light);
  background-color: rgba(255, 255, 255, 0.08);
}
.btn-toggle-pwd svg {
  display: block;
  stroke: currentColor;
}

/* Product Image Uploader in Admin Modal */
.product-image-uploader-wrap {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}
.product-image-preview-box {
  width: 90px;
  height: 90px;
  min-width: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.image-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-upload-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  border: 1px solid var(--primary-gold);
  color: var(--primary-gold-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-upload-file:hover {
  background: var(--primary-gold);
  color: #111;
  box-shadow: 0 2px 8px var(--primary-gold-glow);
}
.image-upload-hint {
  font-size: 10.5px;
  color: var(--text-muted);
}
.image-preset-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.preset-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.preset-img-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.preset-img-btn:hover {
  border-color: var(--primary-gold);
  color: var(--primary-gold-light);
  background-color: var(--bg-surface-hover);
}

/* Modals */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(5, 7, 10, 0.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; padding: 20px;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
#receipt-modal {
  z-index: 1200;
}
/* Login modal harus tampil DI ATAS mobile-login-gate (z-index: 9999) */
#login-modal {
  z-index: 10000;
}
.modal-window {
  background-color: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-xl);
  max-width: 520px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.8);
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-pop { 0% { transform: scale(0.92); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.btn-close-modal { background: transparent; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; background-color: var(--bg-surface-elevated); }

.customizer-product-header { display: flex; gap: 14px; margin-bottom: 16px; }
.customizer-thumb { width: 68px; height: 68px; border-radius: var(--radius-md); object-fit: cover; }
.customizer-desc { font-size: 11.5px; color: var(--text-muted); margin-bottom: 5px; }
.customizer-base-badge { font-size: 11.5px; color: var(--primary-gold-light); }
.customizer-section { margin-bottom: 16px; }
.customizer-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-main); margin-bottom: 7px; }
.customizer-options-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.option-radio-chip, .option-checkbox-chip { display: flex; align-items: center; position: relative; cursor: pointer; }
.option-radio-chip input, .option-checkbox-chip input { position: absolute; opacity: 0; }
.chip-content { width: 100%; background-color: var(--bg-surface-elevated); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 7px 10px; font-size: 11.5px; display: flex; flex-direction: column; }
.option-radio-chip input:checked + .chip-content,
.option-checkbox-chip input:checked + .chip-content { border-color: var(--primary-gold); background-color: rgba(245, 158, 11, 0.15); color: var(--primary-gold-light); font-weight: 700; }
.chip-content small { color: var(--text-muted); font-size: 9.5px; }

/* Thermal Receipt */
.receipt-modal-container { display: flex; justify-content: center; align-items: center; padding: 10px; }
.thermal-receipt {
  width: 320px; background-color: #fefefe; color: #111111; padding: 22px 18px; font-family: var(--font-mono);
  font-size: 11px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); border-radius: 4px; position: relative;
}
.thermal-receipt::before, .thermal-receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background-size: 12px 6px; }
.thermal-receipt::before { top: -6px; background-image: radial-gradient(circle at 6px 6px, transparent 6px, #fefefe 6px); }
.thermal-receipt::after { bottom: -6px; background-image: radial-gradient(circle at 6px 0px, transparent 6px, #fefefe 6px); }
.receipt-header { text-align: center; margin-bottom: 10px; }
.receipt-logo-icon { font-size: 24px; }
.receipt-title { font-family: var(--font-display); font-size: 15px; font-weight: 800; letter-spacing: -0.5px; color: #000; }
.receipt-branch-badge { display: inline-block; background: #222; color: white; font-size: 9px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin: 3px 0; }
.receipt-tagline { font-size: 9.5px; font-style: italic; color: #444; }
.receipt-address, .receipt-phone { font-size: 9px; color: #555; margin-top: 2px; }
.receipt-divider-dashed { border-top: 1px dashed #777; margin: 8px 0; }
.receipt-divider-solid { border-top: 1px solid #111; margin: 8px 0; }
.receipt-meta { display: flex; flex-direction: column; gap: 2.5px; font-size: 10px; }
.meta-row { display: flex; justify-content: space-between; }
.badge-order-type { font-weight: 700; text-transform: uppercase; }
.receipt-items-container { display: flex; flex-direction: column; gap: 7px; margin: 7px 0; }
.receipt-line-item { display: flex; flex-direction: column; }
.receipt-item-main { display: flex; justify-content: space-between; font-weight: 700; }
.receipt-item-qty { width: 22px; }
.receipt-item-name { flex: 1; }
.receipt-item-price { text-align: right; }
.receipt-variant-note, .receipt-topping-note, .receipt-item-note { font-size: 9px; color: #555; padding-left: 22px; }
.receipt-totals { display: flex; flex-direction: column; gap: 3px; }
.total-row { display: flex; justify-content: space-between; }
.discount-row { color: #c00; }
.grand-total-row { font-size: 12.5px; font-weight: 800; border-top: 1px dashed #222; padding-top: 4px; margin-top: 4px; }
.grand-total-val { font-size: 13.5px; }
.receipt-payment-info { display: flex; flex-direction: column; gap: 2.5px; }
.change-highlight { font-weight: 700; font-size: 11px; }
.receipt-barcode { text-align: center; margin: 12px 0 6px; }
.barcode-visual { font-family: monospace; font-size: 18px; letter-spacing: 2px; font-weight: 900; color: #000; line-height: 1; }
.barcode-number { font-size: 8.5px; color: #555; margin-top: 2px; }
.receipt-footer { text-align: center; font-size: 9px; color: #555; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }

/* Toast */
.toast-container { position: fixed; top: 76px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; pointer-events: none; }
.toast-pill {
  background: rgba(18, 21, 30, 0.95); backdrop-filter: blur(12px); border: 1px solid var(--border-subtle); border-radius: 99px;
  padding: 9px 18px; color: var(--text-main); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg); transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease; opacity: 0; pointer-events: auto;
}
.toast-pill.show { transform: translateX(0); opacity: 1; }
.toast-success { border-color: rgba(16, 185, 129, 0.5); }
.toast-warning { border-color: rgba(245, 158, 11, 0.5); }
.toast-error { border-color: rgba(239, 68, 68, 0.5); }
.toast-info { border-color: rgba(59, 130, 246, 0.5); }

/* Multi-Branch Sales Leaderboard & Multi-Admin Styling */
.branch-leaderboard-container {
  margin-bottom: 24px;
}
.branch-leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.branch-rank-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  position: relative;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.branch-rank-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.branch-rank-card.top-branch-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(18, 21, 30, 0.95) 100%);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}
.branch-rank-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.branch-medal {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.branch-rank-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.text-muted-xs {
  font-size: 11px;
  color: var(--text-muted);
}
.branch-rank-revenue {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-gold-light);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.branch-rank-revenue small {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.branch-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-gold), #fbbf24);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Print Media - Sempurna untuk printer Thermal 58mm/80mm maupun Standard A4 */
@media print {
  @page {
    size: 80mm auto;
    margin: 0;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-shell {
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  /* Sembunyikan semua UI aplikasi kecuali receipt modal */
  .top-header,
  .frontend-container,
  .pos-catalog-panel,
  .pos-cart-panel,
  .admin-container,
  .pos-mobile-nav-bar,
  .pos-mobile-floating-bar,
  .toast-container,
  .modal-overlay:not(#receipt-modal),
  .modal-header,
  .modal-footer,
  .btn-close-modal {
    display: none !important;
    visibility: hidden !important;
  }

  #receipt-modal {
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
  }

  #receipt-modal .modal-window {
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    background: transparent !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  #receipt-modal .modal-body {
    padding: 0 !important;
    overflow: visible !important;
  }

  .thermal-receipt {
    box-shadow: none !important;
    margin: 0 auto !important;
    width: 80mm !important;
    max-width: 100% !important;
    padding: 6mm 4mm !important;
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
  }

  .thermal-receipt::before,
  .thermal-receipt::after {
    display: none !important;
  }
}

/* ======================================================== */
/* BASE STYLES FOR MOBILE CONTROLS (Hidden on Desktop)       */
/* ======================================================== */
.pos-mobile-nav-bar {
  display: none;
}
.pos-mobile-floating-bar {
  display: none;
}
.btn-mob-back-menu {
  display: none;
}
.table-container-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  min-width: 620px;
}

@keyframes floatUp {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ======================================================== */
/* 1. TABLET LANDSCAPE & COMPACT LAPTOPS (max-width: 1024px)*/
/* ======================================================== */
@media (max-width: 1024px) {
  .pos-cart-panel {
    width: 340px;
  }
  .admin-sidebar {
    width: 220px;
  }
  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .charts-grid-row {
    grid-template-columns: 1fr;
  }
  .shift-grid-row {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    gap: 12px;
  }
  .branch-leaderboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ======================================================== */
/* 2. TABLET PORTRAIT & MOBILE SCREENS (max-width: 840px)   */
/* ======================================================== */
@media (max-width: 840px) {
  .app-shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  /* Responsive Top Header */
  .top-header {
    height: auto;
    min-height: 50px;
    padding: 6px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 8px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  .brand-section {
    order: 1;
    gap: 8px;
  }
  .brand-logo-icon {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .brand-name {
    font-size: 14.5px;
  }
  .brand-tagline {
    display: none; /* Hide tagline on mobile to save vertical space */
  }
  .branch-select-wrap {
    order: 2;
    flex: 1 1 auto;
    max-width: 190px;
    padding: 2px 6px;
  }
  .branch-select-dropdown {
    width: 100%;
    font-size: 11px;
    padding: 4px 2px;
  }
  .view-switcher {
    order: 3;
    display: flex;
    gap: 3px;
  }
  .switch-nav-btn {
    padding: 5px 9px;
    font-size: 11px;
    gap: 4px;
  }
  .scanner-status-chip {
    display: none; /* Accessible via search bar button on touch */
  }
  #header-user-badge {
    order: 4;
  }
  .user-session-chip {
    padding: 3px 8px;
  }
  .user-name {
    font-size: 10.5px;
  }
  .user-role {
    font-size: 8px;
  }
  .header-meta {
    order: 5;
    gap: 4px;
  }
  .live-datetime {
    display: none; /* Hide clock on tablet/phone to preserve header space */
  }
  .header-action-btn {
    width: 28px;
    height: 28px;
  }

  /* POS View - Tablet Portrait & Mobile Segmented Architecture */
  .pos-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100% !important;
    max-height: 100%;
    width: 100%;
    min-height: 0;
    position: relative;
    overflow: hidden;
  }

  /* Top Segmented Tabs: [🥞 Katalog Menu] [🛒 Pesanan Aktif (N)] */
  .pos-mobile-nav-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    z-index: 40;
  }
  .pos-mob-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }
  .pos-mob-tab.active {
    background: linear-gradient(135deg, var(--primary-gold), #d97706);
    color: #111;
    border-color: var(--primary-gold-light);
    box-shadow: 0 4px 14px var(--primary-gold-glow);
  }
  .pos-mob-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    line-height: 1;
  }
  .pos-mob-tab.active .pos-mob-badge {
    background: #111;
    color: var(--primary-gold-light);
  }

  /* Catalog Panel */
  .pos-catalog-panel {
    flex: 1;
    padding: 12px 14px 85px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  .pos-filter-bar {
    gap: 8px;
  }
  .search-box-wrap {
    min-width: 100%;
    order: 1;
  }
  .category-pills-bar {
    order: 3;
    width: 100%;
    padding-bottom: 4px;
  }
  .btn-outline-action {
    order: 2;
    padding: 6px 12px;
    font-size: 11.5px;
  }

  /* Cart Panel - Mobile Full Smooth Scrollable Page */
  .pos-cart-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    border-left: none;
    border-top: none;
    height: 100% !important;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  .cart-header {
    padding: 10px 14px;
    position: sticky;
    top: 0;
    background: var(--bg-sidebar);
    z-index: 10;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  .btn-mob-back-menu {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--primary-gold-light);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    touch-action: manipulation;
  }
  .order-setup-section {
    padding: 8px 12px;
    flex-shrink: 0;
  }
  .cart-items-scroll {
    flex-shrink: 0;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .cart-checkout-section {
    flex-shrink: 0;
    border-top: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
    padding: 12px 14px 100px !important; /* Crucial bottom padding so cash input & checkout button are fully visible */
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .payment-subpanel {
    background-color: var(--bg-surface-elevated);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-top: 2px;
  }
  .quick-cash-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .quick-cash-chip {
    width: 100% !important;
    min-width: 0 !important;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 11px !important;
    font-weight: 700;
    padding: 8px 2px !important;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
  }
  .quick-cash-chip:active, .quick-cash-chip:hover {
    background-color: rgba(245, 158, 11, 0.2);
    border-color: var(--primary-gold);
    color: var(--primary-gold-light);
  }
  .cash-input-field {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 16px !important; /* 16px prevents iOS Safari auto zoom */
    font-weight: 800;
    color: var(--text-main);
    outline: none;
    margin-bottom: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  }
  .cash-input-field:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px var(--primary-gold-glow);
    background-color: var(--bg-surface-elevated);
  }
  .change-display-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 4px;
  }
  .change-status-text {
    font-size: 11.5px;
    font-weight: 600;
  }
  .change-val {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-green);
  }
  .btn-checkout-action {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 800;
    border-radius: var(--radius-md);
    margin-top: 6px;
    min-height: 48px;
  }

  /* Sticky Bottom Quick Checkout Floating Pill */
  .pos-mobile-floating-bar {
    position: fixed;
    bottom: 16px;
    left: 14px;
    right: 14px;
    z-index: 99;
    background: linear-gradient(135deg, #1f2535 0%, #131722 100%);
    border: 1.5px solid var(--primary-gold);
    border-radius: var(--radius-xl);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 20px var(--primary-gold-glow);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    animation: floatUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    touch-action: manipulation;
  }
  .floating-cart-info {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .floating-cart-icon {
    font-size: 22px;
  }
  .floating-cart-info strong {
    display: block;
    font-size: 13px;
    color: var(--text-main);
    font-family: var(--font-display);
  }
  .floating-cart-total {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-gold-light);
    font-family: var(--font-display);
  }
  .floating-cart-action span {
    background: linear-gradient(135deg, var(--primary-gold), #d97706);
    color: #111;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px var(--primary-gold-glow);
  }

  /* Admin Dashboard - Tablet & Mobile Horizontal Swipe Menu */
  .admin-container {
    flex: 1;
    height: 100% !important;
    max-height: 100%;
    width: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .admin-layout {
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }
  .admin-sidebar {
    width: 100%;
    padding: 8px 12px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    background: var(--bg-surface);
  }
  .admin-sidebar-role-badge {
    margin: 0 0 6px 0 !important;
    padding: 6px 10px !important;
  }
  .admin-sidebar-menu {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .admin-sidebar-menu::-webkit-scrollbar {
    display: none;
  }
  .admin-nav-item {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 99px;
  }
  .admin-sidebar-footer {
    display: none; /* Hide reset demo from sticky header, accessible via settings */
  }
  .admin-main-content {
    padding: 14px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-pane-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .admin-filter-group {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-date-picker, .admin-branch-select {
    flex: 1;
    min-width: 130px;
  }
  .table-toolbar {
    padding: 10px 14px;
    gap: 8px;
  }
  .table-search-input {
    min-width: 100%;
  }

  /* Dialog Modals */
  .modal-overlay {
    padding: 12px;
  }
  .modal-window {
    max-width: 100%;
    max-height: 94vh;
    border-radius: var(--radius-lg);
  }
}

/* ======================================================== */
/* 3. MOBILE PHONES (max-width: 580px)                      */
/* ======================================================== */
@media (max-width: 580px) {
  .top-header {
    padding: 6px 10px;
  }
  .brand-tag {
    display: none;
  }
  .brand-icon {
    font-size: 18px;
  }
  .branch-select-dropdown {
    font-size: 11px;
    padding: 5px 8px;
  }
  .switch-nav-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .switch-nav-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Catalog 2-Column Grid on Mobile Phone */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-bottom: 85px;
  }
  .product-image-wrap {
    height: 105px;
  }
  .product-info {
    padding: 8px 10px;
  }
  .product-title {
    font-size: 12.5px;
    line-height: 1.25;
    margin-bottom: 2px;
  }
  .product-desc {
    display: none; /* Hide long description to preserve neat clean card */
  }
  .product-price {
    font-size: 13px;
  }
  .btn-add-item {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }
  .pos-search-input {
    font-size: 12.5px;
    padding: 8px 14px 8px 36px;
  }
  .category-pill {
    padding: 6px 12px;
    font-size: 11.5px;
  }

  /* Admin Cards */
  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .kpi-card {
    padding: 12px 14px;
  }
  .kpi-value {
    font-size: 17px;
  }
  .kpi-label {
    font-size: 10px;
  }
  .branch-leaderboard-grid {
    grid-template-columns: 1fr;
  }

  /* Payment quick cash pills grid */
  .quick-cash-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .quick-cash-chip {
    width: 100%;
    min-width: 0;
    font-size: 10.5px;
    font-weight: 700;
    padding: 7px 2px;
  }

  /* Receipt Modal */
  .thermal-receipt {
    width: 100%;
    max-width: 290px;
    padding: 16px 12px;
  }

  /* Toast Notification */
  .toast-container {
    top: auto;
    bottom: 80px;
    left: 10px;
    right: 10px;
  }
  .toast-pill {
    width: 100%;
    justify-content: center;
    font-size: 11.5px;
    padding: 8px 14px;
  }
}


/* ============================================================= */
/* MOBILE LOGIN GATE - Full-screen lock for HP/Tablet pre-login  */
/* ============================================================= */

.mobile-login-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-main);
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.mobile-login-gate.active {
  display: flex;
}

.mlg-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 36px 28px 28px;
  max-width: 380px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(245,158,11,0.15), var(--shadow-gold);
  animation: mlgSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes mlgSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mlg-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  box-shadow: var(--shadow-gold);
  margin-bottom: 6px;
  animation: mlgPulse 2.5s ease-in-out infinite;
}

@keyframes mlgPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(245,158,11,0.3); }
  50%       { box-shadow: 0 8px 40px rgba(245,158,11,0.55); }
}

.mlg-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
  margin-bottom: 2px;
}

.mlg-subtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mlg-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 8px 0 4px;
}

.mlg-login-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #111;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s ease;
  margin-top: 10px;
}

.mlg-login-btn:hover, .mlg-login-btn:active {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(245,158,11,0.4);
}

.mlg-footer {
  font-size: 10.5px;
  color: var(--text-dark);
  margin-top: 16px;
}

/* ========================================== */
/* LOGIN ERROR FEEDBACK & SHAKE EFFECTS      */
/* ========================================== */
.login-feedback-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.4;
  margin-bottom: 14px;
  animation: loginShake 0.4s ease-in-out;
}

.login-feedback-alert.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.form-control.input-error {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.06) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22) !important;
  animation: loginShake 0.35s ease-in-out;
}

@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
