/* ═══════════════════════════════════════
   AUTH SCREEN
═══════════════════════════════════════ */
#screen-auth {
  background: linear-gradient(155deg, #1C1410 0%, #2D1F12 45%, #1A1208 100%);
  align-items: center;
  justify-content: flex-end;
  min-height: 100dvh;
  padding: 0;
}

.auth-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--s4) calc(var(--s4) + var(--sab));
}

/* Top logo area */
.auth-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--s8) + var(--sat)) var(--s4) var(--s6);
  text-align: center;
}
.auth-logo-badge {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto var(--s4);
  backdrop-filter: blur(12px);
}
.auth-brand {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -1px;
  line-height: 1;
}
.auth-tagline {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Glass card */
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: var(--r-2xl);
  padding: var(--s5) var(--s4) var(--s4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Language toggle */
.lang-toggle {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 3px;
  margin-bottom: var(--s4);
}
.lang-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--r-pill);
  font-size: var(--t-sm);
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-md);
}
.lang-btn.active {
  background: rgba(255,255,255,0.14);
  color: #FFFFFF;
}

/* Code display */
.auth-display {
  height: 72px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s4);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 10px;
  color: #FFFFFF;
  transition: all var(--dur-md);
}
.auth-display.empty {
  font-size: var(--t-md);
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.35);
  font-weight: 500;
}

/* Keypad */
.auth-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
}
.keypad-key {
  height: 62px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.09);
  font-size: var(--t-xl);
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur-fast);
  user-select: none;
  gap: 2px;
}
.keypad-key:active {
  background: rgba(255,255,255,0.18);
  transform: scale(0.93);
}
.keypad-key.letter {
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.7);
}
.keypad-key.delete {
  background: rgba(220,38,38,0.15);
  border-color: rgba(220,38,38,0.2);
  font-size: 22px;
}
.keypad-key.submit {
  background: rgba(22,163,74,0.25);
  border-color: rgba(22,163,74,0.35);
  color: #4ADE80;
  font-size: var(--t-lg);
}


/* ═══════════════════════════════════════
   HOME SCREEN
═══════════════════════════════════════ */
#screen-home {
  background: var(--bg);
}

/* Hero section */
.home-hero {
  background: linear-gradient(145deg, #1C1410 0%, #2D1F12 60%, #1A1208 100%);
  padding: calc(var(--s6) + var(--sat)) var(--s4) var(--s8);
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 36px;
  background: var(--bg);
  border-radius: 36px 36px 0 0;
}
.home-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.home-greeting {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.home-date {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  margin-top: 4px;
}
.home-hero-btns {
  display: flex;
  gap: var(--s2);
  margin-top: 4px;
}
.hero-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast);
  flex-shrink: 0;
}
.hero-icon-btn:active { background: rgba(255,255,255,0.20); }

/* Action cards (overlap hero) */
.home-cards {
  margin: calc(-1 * var(--s7)) var(--s4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  position: relative;
  z-index: 1;
}
.home-action-card {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s5) var(--s4);
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.6);
}
.home-action-card:active { transform: scale(0.97); box-shadow: var(--shadow-sm); }

.home-action-card.cash-in {
  background: linear-gradient(135deg, #1C1917 0%, #2D2016 100%);
  color: #fff;
}
.home-action-card.expense-out {
  background: var(--bg-card);
  color: var(--text-primary);
}

.action-icon-box {
  width: 52px; height: 52px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.cash-in    .action-icon-box { background: rgba(255,255,255,0.12); }
.expense-out .action-icon-box { background: var(--due-bg); }

.action-text { flex: 1; }
.action-title {
  font-size: var(--t-lg);
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.1;
}
.action-sub {
  font-size: var(--t-sm);
  opacity: 0.55;
  margin-top: 3px;
  font-weight: 500;
}

.action-chevron {
  font-size: 22px;
  opacity: 0.4;
  font-weight: 300;
}

/* Recent customers */
.home-body {
  padding: var(--s5) var(--s4);
}

.recent-list { display: flex; flex-direction: column; gap: var(--s2); }

/* Bottom of home */
.home-footer {
  padding: 0 var(--s4) calc(var(--s5) + var(--sab));
  text-align: center;
}
.sign-out-link {
  font-size: var(--t-sm);
  color: var(--text-hint);
  font-weight: 600;
  padding: var(--s3) var(--s4);
  display: inline-block;
  cursor: pointer;
}
.sign-out-link:active { color: var(--due-clr); }


/* ═══════════════════════════════════════
   CUSTOMER SEARCH SCREEN
═══════════════════════════════════════ */
.search-bar-wrap {
  position: relative;
  margin-bottom: var(--s3);
}
.search-bar-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  color: var(--text-hint);
}
.search-bar {
  padding-left: 44px !important;
}

.new-customer-btn {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 13px var(--s4);
  background: var(--bg-card);
  border-radius: var(--r-lg);
  margin-bottom: var(--s4);
  cursor: pointer;
  border: 1.5px dashed var(--border-strong);
  transition: all var(--dur-fast);
  font-size: var(--t-md);
  font-weight: 700;
  color: var(--text-secondary);
}
.new-customer-btn:active { background: var(--bg-input); }
.new-customer-btn .nc-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}


/* ═══════════════════════════════════════
   LOGBOOK SCREEN
═══════════════════════════════════════ */
.logbook-hero {
  background: linear-gradient(145deg, #1C1410 0%, #2D1F12 100%);
  padding: calc(var(--s4) + var(--sat)) var(--s4) var(--s7);
  position: relative;
}
.logbook-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 28px;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
}

.logbook-hero-top {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.logbook-back-btn {
  width: 38px; height: 38px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur-fast);
}
.logbook-back-btn:active { background: rgba(255,255,255,0.2); }

.logbook-hero-info { flex: 1; }
.logbook-customer-name {
  font-size: var(--t-xl);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.logbook-customer-phone {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  margin-top: 3px;
}

.logbook-hero-avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--t-xl);
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

/* Action buttons in logbook */
.logbook-actions {
  padding: var(--s4) var(--s4) 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.service-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--s3) var(--s2);
  background: var(--bg-card);
  border-radius: var(--r-lg);
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all var(--dur-fast);
  box-shadow: var(--shadow-xs);
}
.service-btn:active { transform: scale(0.93); box-shadow: none; }
.service-btn .sb-icon { font-size: 24px; line-height: 1; }
.service-btn .sb-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}
.service-btn.room    { border-color: var(--room-bg);    }
.service-btn.pool    { border-color: var(--pool-bg);    }
.service-btn.kitchen { border-color: var(--kitchen-bg); }
.service-btn.pvr     { border-color: var(--pvr-bg);     }
.service-btn.room:active    { background: var(--room-bg); }
.service-btn.pool:active    { background: var(--pool-bg); }
.service-btn.kitchen:active { background: var(--kitchen-bg); }
.service-btn.pvr:active     { background: var(--pvr-bg); }

/* Logbook toolbar */
.logbook-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s3);
}
.logbook-entry-count {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.entries-list { display: flex; flex-direction: column; }


/* ═══════════════════════════════════════
   SERVICE SCREEN HEADERS (Room/Pool/etc)
═══════════════════════════════════════ */
.service-header {
  padding: calc(var(--s4) + var(--sat)) var(--s4) var(--s6);
  position: relative;
}
.service-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 24px;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
}
.service-header-top {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.service-header-icon {
  font-size: 32px;
  line-height: 1;
}
.service-header-title {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.8px;
}
.service-header-sub {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}

.service-header.room-header    { background: linear-gradient(145deg, #4F46E5, #6366F1); }
.service-header.pool-header    { background: linear-gradient(145deg, #0284C7, #0EA5E9); }
.service-header.kitchen-header { background: linear-gradient(145deg, #EA580C, #F97316); }
.service-header.pvr-header     { background: linear-gradient(145deg, #BE185D, #EC4899); }
.service-header.expense-header { background: linear-gradient(145deg, #1C1410, #2D1F12); }


/* ═══════════════════════════════════════
   ROOM SCREEN
═══════════════════════════════════════ */
.room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.room-card {
  padding: var(--s4);
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all var(--dur-md) var(--ease-spring);
}
.room-card:active { transform: scale(0.96); }
.room-card.selected {
  border-color: var(--room-clr);
  background: var(--room-bg);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}
.room-card .rc-number {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-primary);
  line-height: 1;
}
.room-card.selected .rc-number { color: var(--room-clr); }
.room-card .rc-name {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
}
.room-card .rc-price {
  font-size: var(--t-xs);
  color: var(--text-hint);
  margin-top: 3px;
  font-weight: 500;
}
.room-card.selected .rc-price { color: var(--room-clr); }


/* ═══════════════════════════════════════
   POOL SCREEN
═══════════════════════════════════════ */
.pool-price-info {
  background: var(--pool-bg);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s4);
  font-size: var(--t-sm);
  color: var(--pool-clr);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--s2);
}


/* ═══════════════════════════════════════
   KITCHEN SCREEN
═══════════════════════════════════════ */
.kitchen-add-row {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s4);
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: var(--s3);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.kitchen-add-row .input-field {
  border-radius: var(--r-md);
  margin: 0;
}
.kitchen-add-row .input-field:focus { position: relative; z-index: 1; }

.kitchen-items-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--s4);
}
.kitchen-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border);
  animation: fadeUp var(--dur-md) var(--ease-out) both;
}
.kitchen-item:last-child { border-bottom: none; }
.kitchen-item .ki-name { flex: 1; font-size: var(--t-md); font-weight: 600; }
.kitchen-item .ki-amt {
  font-size: var(--t-md);
  font-weight: 800;
  color: var(--kitchen-clr);
}
.kitchen-item .ki-del {
  width: 30px; height: 30px;
  border-radius: var(--r-sm);
  background: var(--due-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  color: var(--due-clr);
  flex-shrink: 0;
  transition: transform var(--dur-fast);
}
.kitchen-item .ki-del:active { transform: scale(0.88); }

.kitchen-total-bar {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: var(--s4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.kt-label { font-size: var(--t-sm); font-weight: 700; color: var(--text-secondary); }
.kt-total { font-size: var(--t-2xl); font-weight: 900; letter-spacing: -1px; }


/* ═══════════════════════════════════════
   PVR SCREEN
═══════════════════════════════════════ */
.pvr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-bottom: var(--s4);
}
.pvr-card {
  padding: var(--s4);
  background: var(--bg-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all var(--dur-md) var(--ease-spring);
  text-align: left;
}
.pvr-card:active { transform: scale(0.96); }
.pvr-card.selected {
  border-color: var(--pvr-clr);
  background: var(--pvr-bg);
  box-shadow: 0 0 0 4px rgba(236,72,153,0.12);
}
.pvr-card .pc-icon { font-size: 28px; margin-bottom: var(--s2); line-height: 1; }
.pvr-card .pc-name {
  font-size: var(--t-sm);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.pvr-card.selected .pc-name { color: var(--pvr-clr); }
.pvr-card .pc-price {
  font-size: var(--t-xs);
  color: var(--text-hint);
  margin-top: 3px;
  font-weight: 500;
}


/* ═══════════════════════════════════════
   EXPENSE SCREEN
═══════════════════════════════════════ */
.expense-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  margin-bottom: var(--s4);
}
.expense-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--s4) var(--s2);
  background: var(--bg-input);
  border-radius: var(--r-lg);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--dur-fast);
  user-select: none;
}
.expense-cat .ec-icon { font-size: 26px; line-height: 1; }
.expense-cat .ec-label {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}
.expense-cat.selected {
  background: var(--text-primary);
  border-color: var(--text-primary);
}
.expense-cat.selected .ec-label { color: #fff; }
.expense-cat:active { transform: scale(0.95); }

.expense-log-section { margin-top: var(--s2); }


/* ═══════════════════════════════════════
   ADMIN SCREEN
═══════════════════════════════════════ */
#screen-admin {
  background: var(--bg);
}
.admin-hero {
  background: linear-gradient(145deg, #1C1410 0%, #2D1F12 60%, #3C2410 100%);
  padding: calc(var(--s5) + var(--sat)) var(--s4) var(--s7);
  position: relative;
}
.admin-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 28px;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
}
.admin-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(217,119,6,0.2);
  border: 1px solid rgba(217,119,6,0.4);
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  font-weight: 700;
  color: #FCD34D;
  margin-bottom: var(--s3);
  letter-spacing: 0.5px;
}
.admin-title {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.admin-subtitle {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  font-weight: 500;
}
.admin-back-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.13);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  transition: background var(--dur-fast);
  flex-shrink: 0;
}
.admin-back-btn:active { background: rgba(255,255,255,0.2); }

.admin-body {
  padding: var(--s4);
  padding-bottom: calc(var(--s7) + var(--sab));
}

.admin-section-label {
  font-size: var(--t-xs);
  font-weight: 800;
  color: var(--text-hint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: var(--s4) 0 var(--s2);
}

.admin-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--s4);
}


/* ═══════════════════════════════════════
   SUMMARY / GLOBAL LOGBOOK
═══════════════════════════════════════ */
.net-profit-bar {
  background: linear-gradient(135deg, #1C1917 0%, #2D2016 100%);
  border-radius: var(--r-lg);
  padding: var(--s4) var(--s5);
  margin-top: var(--s4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.net-profit-bar .np-label {
  font-size: var(--t-sm);
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.net-profit-bar .np-value {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}


/* ═══════════════════════════════════════
   NOTIFICATIONS SCREEN
═══════════════════════════════════════ */
.notif-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: var(--s4);
  margin-bottom: var(--s2);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
  border-left: 3px solid var(--running-clr);
  animation: fadeUp var(--dur-md) var(--ease-out) both;
}
.notif-card .nc-title { font-size: var(--t-md); font-weight: 700; }
.notif-card .nc-body  { font-size: var(--t-sm); color: var(--text-secondary); margin-top: 3px; }
.notif-card .nc-time  { font-size: var(--t-xs); color: var(--text-hint); margin-top: 6px; }


/* ═══════════════════════════════════════
   STICKY CTA
═══════════════════════════════════════ */
.sticky-cta {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  padding: var(--s3) var(--s4) calc(var(--s3) + var(--sab));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  z-index: 10;
}
