/* EZY Pawnshop 2006 Web PWA - Premium Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Tokens */
  --primary-red: #B30006;
  --primary-red-hover: #900004;
  --primary-red-light: rgba(179, 0, 6, 0.08);
  --accent-gold: #D4AF37;
  --accent-gold-hover: #bda031;
  --accent-gold-light: rgba(212, 175, 55, 0.15);
  --bg-white: #FFFFFF;
  --bg-light: #F9F9FB;
  --bg-gray: #EFEFF4;
  --text-dark: #1A1A1A;
  --text-medium: #5C5C5C;
  --text-light: #A0A0A0;
  --border-light: #E5E5EA;
  --success-green: #34C759;
  --warning-orange: #FF9500;
  
  /* Styling Tokens */
  --font-thai: 'Sarabun', sans-serif;
  --font-eng: 'Outfit', sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(179, 0, 6, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  
  /* Layout */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-thai);
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(at 0% 0%, rgba(179, 0, 6, 0.05) 0px, transparent 50%),
              radial-gradient(at 100% 0%, rgba(212, 175, 55, 0.05) 0px, transparent 50%),
              radial-gradient(at 50% 100%, rgba(179, 0, 6, 0.04) 0px, transparent 50%),
              var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

/* App Container (Simulate Phone / Mobile Max Width) */
#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background-color: var(--bg-white);
  box-shadow: 0 0 30px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Responsive adjustments for Admin on larger screens */
body.admin-mode {
  background: radial-gradient(at 0% 0%, rgba(255, 149, 0, 0.15) 0px, transparent 50%),
              radial-gradient(at 100% 0%, rgba(255, 180, 80, 0.14) 0px, transparent 50%),
              radial-gradient(at 50% 100%, rgba(255, 215, 160, 0.22) 0px, transparent 60%),
              linear-gradient(135deg, #FFFDF8 0%, #FFF4E6 45%, #FFEEDC 100%) !important;
}
body.admin-mode #app {
  max-width: 100% !important;
  width: 100vw;
  background: transparent !important;
  box-shadow: none !important;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-thai);
  font-weight: 600;
  color: var(--text-dark);
}
.number {
  font-family: var(--font-eng);
}

/* Utility Classes */
.flex-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hidden {
  display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGold {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.fade-in-el {
  animation: fadeIn var(--transition-normal);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  gap: 8px;
  width: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-red), #E60008);
  color: var(--bg-white);
  box-shadow: 0 4px 15px rgba(179, 0, 6, 0.2);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(179, 0, 6, 0.3);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #e0bc4f);
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #e5be3c, #cca62d);
}
.btn-secondary {
  background-color: var(--bg-gray);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  background-color: var(--border-light);
}
.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-red);
  color: var(--primary-red);
}
.btn-outline:hover {
  background-color: var(--primary-red-light);
}

/* Card Styling (Premium Light Mode Glassmorphism Overrides) */
.card, .widget-card, .chart-card, .ticket-card {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 8px 32px 0 rgba(179, 0, 6, 0.03), 0 2px 8px rgba(0, 0, 0, 0.02) !important;
  transition: var(--transition-normal) !important;
}
.card:hover, .widget-card:hover, .chart-card:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 12px 40px 0 rgba(179, 0, 6, 0.06), var(--shadow-md) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}
.ticket-card:hover {
  background: rgba(255, 255, 255, 0.85) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 40px 0 rgba(179, 0, 6, 0.06), var(--shadow-md) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
}
.card-gold-border {
  border-left: 5px solid var(--accent-gold) !important;
}
.card-red-border {
  border-left: 5px solid var(--primary-red) !important;
}

/* Inputs */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-medium);
}
.input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  font-size: 16px;
  transition: var(--transition-fast);
  background-color: var(--bg-light);
}
.input-field:focus {
  outline: none;
  border-color: var(--primary-red);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 4px var(--primary-red-light);
}

/* Header & Logo */
.app-header {
  padding: 16px 20px;
  background-color: var(--primary-red); /* RED BACKGROUND */
  border-bottom: 1.5px solid var(--primary-red-hover);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-header img {
  height: 36px;
  width: 36px;
}
.app-header .title-group h1 {
  font-size: 18px;
  color: var(--bg-white); /* WHITE TEXT */
  font-weight: 700;
}
.app-header .title-group p {
  font-size: 11px;
  color: var(--accent-gold); /* GOLD TEXT */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.app-header .btn-outline {
  border-color: var(--bg-white) !important;
  color: var(--bg-white) !important;
}
.app-header .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* --- LOGIN SCREEN --- */
.login-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 24px;
  background: radial-gradient(circle at top right, var(--primary-red-light) 0%, var(--bg-white) 60%);
}
.login-logo-container {
  text-align: center;
  margin-bottom: 40px;
}
.login-logo-container img {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 8px 16px rgba(179, 0, 6, 0.15));
  margin-bottom: 16px;
}
.login-logo-container h2 {
  font-size: 24px;
  color: var(--primary-red);
  font-weight: 700;
}
.login-logo-container p {
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
}

/* --- OTP DIALOG MODAL --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal-content {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: var(--transition-normal);
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.otp-icon {
  font-size: 40px;
  color: var(--accent-gold);
  margin-bottom: 16px;
}
.otp-simulated-sms {
  background-color: var(--primary-red-light);
  border-left: 4px solid var(--primary-red);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 13px;
  text-align: left;
}
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}
.otp-box {
  width: 45px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-light);
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-eng);
  background-color: var(--bg-light);
}
.otp-box:focus {
  outline: none;
  border-color: var(--primary-red);
  background-color: var(--bg-white);
  box-shadow: 0 0 0 3px var(--primary-red-light);
}

/* --- CLIENT WEB APP PORTAL --- */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  padding-bottom: 90px; /* Space for bottom tab bar */
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--bg-white);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 1;
  height: 100%;
}
.nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
  transition: var(--transition-fast);
}
.nav-item.active {
  color: var(--primary-red);
}
.nav-item.active i {
  color: var(--primary-red);
  transform: translateY(-2px);
}
.nav-item.active::after {
  content: '';
  width: 4px;
  height: 4px;
  background-color: var(--accent-gold);
  border-radius: 50%;
  margin-top: 2px;
}

/* Tab Screens */
.tab-screen {
  display: none;
}
.tab-screen.active {
  display: block;
  animation: fadeIn 0.4s var(--transition-normal);
}

/* Profile Section on Home */
.profile-card {
  background: linear-gradient(135deg, var(--primary-red), #800004);
  color: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.profile-card::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}
.profile-card h3 {
  color: var(--accent-gold);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.profile-info-row {
  margin-bottom: 8px;
}
.profile-info-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.profile-info-val {
  font-size: 16px;
  font-weight: 500;
}
.profile-info-val.name {
  font-size: 18px;
  font-weight: 600;
}

/* Stats Cards */
.stats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.stat-box {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-box.highlighted {
  border-top: 4px solid var(--primary-red);
}
.stat-box h4 {
  font-size: 12px;
  color: var(--text-medium);
  margin-bottom: 8px;
}
.stat-box .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-red);
}

/* Interest Calculation Display */
.interest-calc-banner {
  background-color: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px dashed var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.interest-calc-banner i {
  font-size: 24px;
  color: var(--accent-gold);
}
.interest-calc-text p:first-child {
  font-size: 11px;
  color: var(--text-medium);
}
.interest-calc-text p:last-child {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

/* Ticket Cards */
.ticket-list-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ticket-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
}
.ticket-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ticket-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.ticket-id {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 15px;
}
.ticket-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
}
.badge-pending {
  background-color: var(--warning-orange);
  color: var(--bg-white);
}
.badge-paid {
  background-color: var(--success-green);
  color: var(--bg-white);
}
.badge-active {
  background-color: var(--primary-red-light);
  color: var(--primary-red);
}
.ticket-card.card-gold-border {
  border-left: 5px solid var(--accent-gold);
}
.ticket-card.card-red-border {
  border-left: 5px solid var(--primary-red);
}

/* Red card theme for Tickets tab */
.ticket-card-red {
  background: linear-gradient(135deg, var(--bg-white) 75%, #FFF5F5 100%);
  border: 2px solid var(--primary-red) !important;
  box-shadow: 0 4px 12px rgba(179, 0, 6, 0.08);
}
.ticket-card-red .ticket-badge.badge-active {
  background-color: var(--primary-red-light);
  color: var(--primary-red);
}
.ticket-row {
  margin-bottom: 6px;
  font-size: 14px;
}
.ticket-label {
  color: var(--text-medium);
}
.ticket-val {
  font-weight: 500;
  color: var(--text-dark);
}
.ticket-val.price {
  font-weight: 700;
  color: var(--primary-red);
  font-size: 15px;
}

/* --- TAB 3: PAY INTEREST VIEWS --- */
/* Interactive Selectable Tickets */
.selectable-ticket {
  background-color: var(--primary-red-light); /* Soft red background */
  border: 1.5px solid rgba(179, 0, 6, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}
.selectable-ticket.selected {
  background-color: #FFFDF0; /* Light yellow background */
  border-color: var(--accent-gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}
.selectable-ticket.selected::after {
  content: '\f058'; /* FontAwesome check circle */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--accent-gold);
  font-size: 20px;
}

.selectable-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.pay-interest-action-bar {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 440px;
  z-index: 99;
  background-color: transparent;
}

/* Bank Transfer Screen Overlay */
.payment-flow-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bank-info-card {
  background-color: var(--bg-light);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.bank-logo {
  width: 50px;
  height: 50px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #178e3d; /* KBANK Color Example */
  border: 1px solid var(--border-light);
  overflow: hidden;
  flex-shrink: 0;
}
.bank-details h4 {
  font-size: 15px;
  color: var(--text-dark);
}
.bank-details p {
  font-size: 13px;
  color: var(--text-medium);
}
.bank-acc-no {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary-red);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-medium);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  transition: var(--transition-fast);
}
.copy-btn:hover {
  color: var(--primary-red);
}

/* Slip Upload Container */
.slip-upload-box {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  background-color: var(--bg-light);
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.slip-upload-box:hover {
  border-color: var(--primary-red);
  background-color: var(--primary-red-light);
}
.slip-upload-box i.upload-icon {
  font-size: 32px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.slip-upload-box p {
  font-size: 13px;
  color: var(--text-medium);
}
.slip-preview-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: rgba(0,0,0,0.05);
}

/* Hidden inputs */
.file-input {
  display: none;
}

/* --- ADMIN PANEL DESIGN --- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(at 0% 0%, rgba(255, 149, 0, 0.15) 0px, transparent 50%),
              radial-gradient(at 100% 0%, rgba(255, 180, 80, 0.14) 0px, transparent 50%),
              radial-gradient(at 50% 100%, rgba(255, 215, 160, 0.22) 0px, transparent 60%),
              linear-gradient(135deg, #FFFDF8 0%, #FFF4E6 45%, #FFEEDC 100%) !important;
}

.admin-sidebar {
  width: 260px;
  background: rgba(255, 250, 244, 0.88) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-right: 1px solid rgba(255, 190, 140, 0.4) !important;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition-normal);
}
.admin-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 200, 160, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-sidebar-header img {
  width: 32px;
  height: 32px;
}
.admin-sidebar-header h2 {
  font-size: 16px;
  color: var(--primary-red);
  font-weight: 700;
}
.admin-nav {
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-medium);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}
.admin-nav-item:hover {
  background-color: rgba(255, 149, 0, 0.12);
  color: var(--primary-red);
}
.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.18) 0%, rgba(179, 0, 6, 0.10) 100%);
  color: var(--primary-red);
  font-weight: 600;
  border-left: 3.5px solid var(--primary-red);
}
.admin-sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-medium);
}

.admin-viewport {
  margin-left: 260px; /* Offset for sidebar */
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header bar inside Admin */
.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.admin-top-bar h1 {
  font-size: 22px;
}

/* Dashboard Widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.widget-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
.widget-card h3 {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 8px;
}
.widget-card .value {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-red);
}
.widget-card .trend {
  font-size: 12px;
  margin-top: 8px;
}
.trend-up {
  color: var(--success-green);
}

.chart-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}
.chart-container {
  height: 300px;
  position: relative;
}

/* Table layout for Admin Management */
.admin-table-container {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  margin-bottom: 20px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.admin-table th, .admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.admin-table th {
  background-color: var(--bg-light);
  color: var(--text-medium);
  font-weight: 600;
}
.admin-table tr:hover {
  background-color: var(--bg-light);
}

.checkbox-container {
  display: inline-block;
  position: relative;
  padding-left: 25px;
  cursor: pointer;
  user-select: none;
}
.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #eee;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}
.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}
.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary-red);
}
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}
.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Filter controls */
.filter-bar {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: end;
}

/* Cloud Upload Drag & Drop View */
.cloud-sync-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.drag-drop-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  background-color: var(--bg-white);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.drag-drop-area:hover {
  border-color: var(--primary-red);
  background-color: var(--primary-red-light);
}
.drag-drop-area i {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.drag-drop-area h3 {
  font-size: 16px;
  margin-bottom: 8px;
}
.drag-drop-area p {
  font-size: 13px;
  color: var(--text-medium);
}
.sync-status-list {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 20px;
}
.sync-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.sync-status-item:last-child {
  border-bottom: none;
}

/* Image preview modal (for slip viewing) */
.image-viewer-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.image-viewer-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.image-viewer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--bg-white);
  font-size: 28px;
  cursor: pointer;
  background: rgba(0,0,0,0.3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-viewer-actions {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  width: 90%;
  max-width: 320px;
}

/* User Manual view on UI */
.help-view {
  padding: 10px;
}
.help-section {
  margin-bottom: 24px;
}
.help-section h3 {
  font-size: 16px;
  color: var(--primary-red);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}
.help-step {
  margin-bottom: 12px;
  font-size: 14px;
}
.help-step strong {
  color: var(--text-dark);
}
.help-step p {
  color: var(--text-medium);
  margin-top: 4px;
}

/* Responsive Overrides */
@media(max-width: 768px) {
  .admin-sidebar {
    width: 60px;
  }
  .admin-sidebar-header h2, .admin-sidebar-footer, .admin-nav-item span {
    display: none;
  }
  .admin-viewport {
    margin-left: 60px;
    padding: 16px;
  }
  .admin-nav-item {
    justify-content: center;
    padding: 12px;
  }
  .cloud-sync-container {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
}

/* Sidebar Sliding Collapse Transition */
.admin-sidebar {
  transition: transform var(--transition-normal), width var(--transition-normal);
}
.admin-viewport {
  transition: margin-left var(--transition-normal), padding var(--transition-normal);
}
/* Collapsed states */
body.admin-mode.sidebar-collapsed .admin-sidebar {
  transform: translateX(-260px);
}
body.admin-mode.sidebar-collapsed .admin-viewport {
  margin-left: 0 !important;
}

/* Sidebar Toggle Floating Button Style */
.sidebar-toggle-btn {
  background-color: var(--bg-white);
  border: 1.5px solid var(--border-light);
  color: var(--primary-red);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.sidebar-toggle-btn:hover {
  background-color: var(--primary-red-light);
}

/* Reconcile Detail Modal Grid Layout */
.reconcile-modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .reconcile-modal-grid {
    grid-template-columns: 1fr;
  }
}
.reconcile-slip-img-container {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-light);
  position: relative;
}
.reconcile-slip-img-container img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
  cursor: zoom-in;
}
.reconcile-slip-img-container img:hover {
  transform: scale(1.03);
}

/* Bank brand theme card variants */
.bank-info-card.bank-kbank {
  background-color: #e8f5e9 !important; /* Light green */
  border-left: 5px solid #2e7d32 !important;
  border-color: #2e7d32 !important;
}
.bank-info-card.bank-kbank .bank-logo {
  background-color: #2e7d32 !important;
  color: white !important;
}
.bank-info-card.bank-scb {
  background-color: #f3e5f5 !important; /* Light purple */
  border-left: 5px solid #7b1fa2 !important;
  border-color: #7b1fa2 !important;
}
.bank-info-card.bank-scb .bank-logo {
  background-color: #7b1fa2 !important;
  color: white !important;
}
.bank-info-card.bank-bbl {
  background-color: #e8eaf6 !important; /* Light indigo */
  border-left: 5px solid #1a237e !important;
  border-color: #1a237e !important;
}
.bank-info-card.bank-bbl .bank-logo {
  background-color: #1a237e !important;
  color: white !important;
}
.bank-info-card.bank-ktb {
  background-color: #e0f7fa !important; /* Light cyan */
  border-left: 5px solid #0097a7 !important;
  border-color: #0097a7 !important;
}
.bank-info-card.bank-ktb .bank-logo {
  background-color: #0097a7 !important;
  color: white !important;
}

/* Print-Only Report elements */
.print-only-report-header {
  display: none;
}
.print-only-report-footer {
  display: none;
}

/* Print Overrides */
@media print {
  @page {
    margin: 0;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body {
    margin: 1.6cm !important;
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  .no-print {
    display: none !important;
  }
  .admin-sidebar,
  .bottom-nav,
  .app-header,
  .admin-top-bar,
  .filter-bar,
  .btn,
  button,
  .admin-sidebar-header,
  .admin-sidebar-footer,
  .sidebar-toggle-btn,
  .modal-overlay {
    display: none !important;
  }
  .admin-viewport {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .admin-table-container {
    box-shadow: none !important;
    border: 1px solid #000000 !important;
  }
  
  .print-only-report-header {
    display: block !important;
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid #000000;
  }
  .print-only-report-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #000000;
  }
  .print-only-report-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333333;
  }
  .print-only-report-header h4 {
    font-size: 13px;
    font-weight: 500;
    color: #555555;
    margin-top: 6px;
  }
  
  .print-only-report-footer {
    display: block !important;
    text-align: right;
    font-size: 12px;
    color: #333333;
    margin-top: 40px;
    border-top: 1px dashed #aaaaaa;
    padding-top: 8px;
  }
}

/* Bank Logo image styling */
.bank-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Report SystemID Print Indicator */
.report-system-id-indicator {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 16px;
  font-weight: bold;
  color: #000000;
  display: none;
}
@media screen {
  .report-system-id-indicator {
    display: none !important;
  }
}
@media print {
  .card {
    position: relative !important;
  }
  .report-system-id-indicator:not(.hidden-indicator) {
    display: block !important;
  }
}
