/* ============================================
   ระบบจอง - Design System
   โทนสี: ฟ้า-น้ำเงิน Gradient (Blue theme)
   ============================================ */

/* Fonts loaded via <link> in HTML for better performance */

/* ============ CSS Variables ============ */
:root {
  /* Primary Colors */
  --primary-purple: #2563eb;
  --primary-purple-dark: #1d4ed8;
  --primary-purple-light: #60a5fa;
  --primary-pink: #0ea5e9;
  --primary-pink-light: #7dd3fc;
  --primary-lavender: #93c5fd;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2563eb, #0ea5e9);
  --gradient-soft: linear-gradient(135deg, #bfdbfe, #7dd3fc, #93c5fd);
  --gradient-hero: linear-gradient(135deg, #eff6ff, #e0f2fe, #f0f9ff);
  --gradient-sidebar: linear-gradient(180deg, #0f172a, #1e3a5f, #1e40af);
  --gradient-card: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.6)
  );
  --gradient-btn: linear-gradient(135deg, #2563eb, #3b82f6, #0ea5e9);
  --gradient-btn-hover: linear-gradient(135deg, #1d4ed8, #2563eb, #0284c7);

  /* Neutrals */
  --bg-main: #f8faff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-sidebar: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --text-white: #ffffff;
  --border-light: rgba(37, 99, 235, 0.15);
  --border-card: rgba(255, 255, 255, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(37, 99, 235, 0.08);
  --shadow-md: 0 4px 20px rgba(37, 99, 235, 0.12);
  --shadow-lg: 0 10px 40px rgba(37, 99, 235, 0.15);
  --shadow-xl: 0 20px 60px rgba(37, 99, 235, 0.2);
  --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.25);

  /* Spacing */
  --sidebar-width: 280px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 50px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============ Reset & Base ============ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Kanit", "Inter", sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit;
}

/* ============ Animated Background Blobs ============ */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #93c5fd, #60a5fa);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #7dd3fc, #0ea5e9);
  bottom: 10%;
  left: -5%;
  animation-delay: -7s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #bfdbfe, #3b82f6);
  top: 40%;
  right: 30%;
  animation-delay: -14s;
}

@keyframes blobFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -50px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(40px, 30px) scale(1.03);
  }
}

/* ============ Login Page ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 20px;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  animation: fadeInUp 0.8s ease-out;
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-btn);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #dc2626;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
  animation: shake 0.4s ease-in-out;
}

.login-error.show {
  display: flex;
  align-items: center;
  gap: 8px;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* ============ Form Elements ============ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group label i {
  margin-right: 6px;
  color: var(--primary-purple);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-purple);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-btn);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--gradient-btn-hover);
  box-shadow: 0 6px 25px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-purple);
  border: 2px solid var(--border-light);
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--primary-purple-light);
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
  box-shadow: 0 6px 25px rgba(5, 150, 105, 0.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 25px rgba(220, 38, 38, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-purple);
  border: 2px solid var(--primary-purple-light);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ============ Layout: Sidebar + Main ============ */
.app-layout {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--gradient-sidebar);
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: var(--transition-smooth);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0 28px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sidebar-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.sidebar-brand span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  margin-top: -4px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  margin-bottom: 4px;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-item i {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 20px;
}

.sidebar-footer {
  padding: 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}

.user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  max-width: 100%;
}

.page-header {
  padding: 32px 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 4px;
}

.page-body {
  padding: 0 40px 40px;
}

/* ============ Cards ============ */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: 24px 28px;
}

.card-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============ Stats Cards ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.stat-card:nth-child(1)::before {
  background: var(--gradient-primary);
}
.stat-card:nth-child(2)::before {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
}
.stat-card:nth-child(3)::before {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}
.stat-card:nth-child(4)::before {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.stat-card:nth-child(1) .stat-icon {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-purple);
}

.stat-card:nth-child(2) .stat-icon {
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
}

.stat-card:nth-child(3) .stat-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.stat-card:nth-child(4) .stat-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ============ Table ============ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead {
  background: rgba(37, 99, 235, 0.05);
}

table th {
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-light);
  white-space: nowrap;
}

table td {
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

table tbody tr {
  transition: var(--transition-fast);
}

table tbody tr:hover {
  background: rgba(37, 99, 235, 0.03);
}

table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.badge-info {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-purple);
}

/* ============ Scanner Section ============ */
.scanner-section {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
}

.scanner-section:hover {
  border-color: var(--primary-purple-light);
  background: rgba(37, 99, 235, 0.02);
}

.scanner-section.scanning {
  border-color: var(--primary-purple);
  background: rgba(124, 58, 237, 0.05);
}

.scanner-icon {
  font-size: 3rem;
  color: var(--primary-purple-light);
  margin-bottom: 16px;
}

.scanner-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.scanner-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.scanner-video-container {
  position: relative;
  max-width: 480px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: none;
  box-shadow: var(--shadow-lg);
}

.scanner-video-container.active {
  display: block;
}

.scanner-video-container video {
  width: 100%;
  border-radius: var(--radius-md);
}

.scanner-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 55%;
  border: 3px solid var(--primary-purple);
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
  animation: scanPulse 2s ease-in-out infinite;
}

@keyframes scanPulse {
  0%,
  100% {
    border-color: var(--primary-purple);
  }
  50% {
    border-color: var(--primary-pink);
  }
}

.scanner-progress {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.scanner-progress.active {
  display: flex;
}

/* ============ Progress Bar ============ */
.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 8px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-btn);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
  width: 0%;
}

/* ============ Booking Receipt ============ */
.receipt-preview {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  padding: 40px;
  max-width: 600px;
  margin: 0 auto;
}

.receipt-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 2px dashed #e5e7eb;
  margin-bottom: 24px;
}

.receipt-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.receipt-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.receipt-id {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-purple);
  margin-top: 8px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.92rem;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-label {
  color: var(--text-secondary);
  font-weight: 400;
}

.receipt-value {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.receipt-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 2px dashed #e5e7eb;
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ============ Search & Filter Bar ============ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  transition: var(--transition-smooth);
  outline: none;
}

.search-input input:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-input i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.filter-select {
  padding: 12px 40px 12px 18px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  transition: var(--transition-smooth);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.filter-select:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Date Filter Row */
.date-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.025) 0%, rgba(99, 102, 241, 0.035) 100%);
  border-radius: var(--radius-lg);
}

.date-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.date-filter-quick-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.date-quick-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.date-quick-btn:hover {
  background: rgba(124, 58, 237, 0.06);
  color: var(--primary-purple);
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-1px);
}

.date-quick-btn.active {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary-purple);
  border-color: var(--primary-purple);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.date-filter-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.filter-date {
  padding: 7px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  outline: none;
  font-family: inherit;
  color: var(--text-primary);
  min-width: 140px;
}

.filter-date:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.date-filter-separator {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 500;
}

.date-clear-btn {
  padding: 6px 12px !important;
  border-radius: var(--radius-pill) !important;
  display: flex;
  align-items: center;
  gap: 4px;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  font-size: 0.8rem !important;
  transition: all 0.2s ease;
}

.date-clear-btn:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

/* ============ Modal ============ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: scaleIn 0.3s ease;
}

.modal-header {
  padding: 24px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.modal-body {
  padding: 24px 28px;
}

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ============ Receipt Modal Fullscreen ============ */
#receiptModal .modal {
  max-width: 95vw;
  width: 860px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

#receiptModal .modal-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

#receiptModal .modal-footer {
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: center;
}

/* Scale the receipt content to fit viewport on small screens */
#receiptModal #receiptExport {
  transform-origin: top left;
}

@media (max-width: 860px) {
  #receiptModal .modal {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }

  #receiptModal.modal-overlay {
    padding: 0;
  }

  #receiptModal .modal-body {
    padding: 8px;
  }

  #receiptModal .modal-footer .btn {
    font-size: 0.78rem;
    padding: 8px 14px;
  }
}

/* ============ Toast Notification ============ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  animation: slideInRight 0.4s ease;
  border-left: 4px solid;
}

.toast-success {
  border-color: #10b981;
}
.toast-error {
  border-color: #ef4444;
}
.toast-info {
  border-color: var(--primary-purple);
}

.toast-icon {
  font-size: 1.2rem;
}

.toast-success .toast-icon {
  color: #10b981;
}
.toast-error .toast-icon {
  color: #ef4444;
}
.toast-info .toast-icon {
  color: var(--primary-purple);
}

.toast-message {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition-fast);
}

.toast-close:hover {
  color: var(--text-primary);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============ Grid Layouts ============ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

/* ============ Animations ============ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Staggered animations */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.stagger > *:nth-child(1) {
  animation-delay: 0.05s;
}
.stagger > *:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger > *:nth-child(3) {
  animation-delay: 0.15s;
}
.stagger > *:nth-child(4) {
  animation-delay: 0.2s;
}
.stagger > *:nth-child(5) {
  animation-delay: 0.25s;
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 4rem;
  color: var(--primary-lavender);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============ Pagination ============ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-light);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.pagination button:hover {
  border-color: var(--primary-purple-light);
  color: var(--primary-purple);
}

.pagination button.active {
  background: var(--gradient-btn);
  color: #fff;
  border-color: transparent;
}

/* ============ Mobile Sidebar Toggle ============ */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 200;
  width: 50px;
  height: 50px;
  border: none;
  background: var(--gradient-btn);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  transition: var(--transition-spring);
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4);
  transform: scale(1.08) translateY(-2px);
}

/* ============ Loading Spinner ============ */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: inherit;
}

.loading-overlay.active {
  display: flex;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* ===== Sidebar ===== */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-toggle {
    display: flex;
  }

  .sidebar-brand {
    padding-top: 80px;
  }

  /* Sidebar backdrop overlay */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .sidebar-backdrop.active {
    display: block;
  }

  /* ===== Main Content ===== */
  .main-content {
    margin-left: 0;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .page-header {
    padding: 20px 16px 14px;
    padding-top: 70px;
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header .btn,
  .page-header > div {
    width: 100%;
  }

  .page-header > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .page-body {
    padding: 0 14px 24px;
  }

  /* ===== Stats Grid ===== */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.78rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  /* ===== Cards ===== */
  .card-header {
    padding: 16px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .card-header h2 {
    font-size: 1rem;
    width: 100%;
  }

  .card-body {
    padding: 16px 14px;
  }

  .card-footer {
    padding: 14px;
    flex-wrap: wrap;
  }

  /* ===== Form ===== */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-left: 0 !important;
  }

  .form-control {
    padding: 12px 14px;
    font-size: 16px; /* prevent iOS zoom */
  }

  select.form-control {
    font-size: 16px;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  /* ===== Booking Form Sections ===== */
  .form-section .section-header {
    margin-bottom: 14px !important;
  }

  /* Doc title/number in card header */
  .card-header > div[style*="display: flex"][style*="gap: 10px"] {
    flex-direction: column;
    width: 100%;
  }

  .card-header > div > div[style*="border-radius: 10px"] {
    width: 100%;
  }

  .card-header > div > div[style*="border-radius: 10px"] input {
    width: 100% !important;
  }

  /* ===== Tables ===== */
  .table-container {
    margin: 0 -14px;
    padding: 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table th,
  table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  /* ===== Filter Bar ===== */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-input {
    min-width: unset;
  }

  .filter-select {
    width: 100%;
    font-size: 16px;
  }

  .date-filter-row {
    gap: 8px;
    padding: 10px;
  }

  .date-filter-quick-btns {
    order: 2;
    gap: 6px;
  }

  .date-quick-btn {
    padding: 7px 12px;
    font-size: 0.82rem;
    min-height: 36px;
  }

  .date-filter-inputs {
    order: 3;
    margin-left: 0;
    width: 100%;
    overflow: hidden;
  }

  .filter-date {
    flex: 1;
    min-width: 0;
    max-width: 50%;
    font-size: 16px;
    min-height: 40px;
  }

  .date-clear-btn {
    min-height: 36px;
  }

  /* ===== Buttons ===== */
  .btn {
    min-height: 44px; /* touch target */
    font-size: 0.88rem;
  }

  .btn-sm {
    min-height: 38px;
    padding: 8px 14px;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 0.95rem;
    width: 100%;
  }

  .btn-block {
    font-size: 1rem;
  }

  /* Action button groups */
  .card-footer,
  .modal-footer {
    flex-direction: column;
    gap: 8px;
  }

  .card-footer .btn,
  .modal-footer .btn {
    width: 100%;
  }

  /* ===== Modal ===== */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
    max-height: 95vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    animation: slideUp 0.3s ease;
  }

  .modal-header {
    padding: 16px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 14px 16px 20px;
    background: #fff;
    border-top: 1px solid var(--border-light);
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  /* ===== Receipt Modal ===== */
  #receiptModal .modal-footer .btn {
    font-size: 0.82rem;
    padding: 10px 14px;
    min-height: 40px;
  }

  /* ===== Receipt Preview ===== */
  .receipt-preview {
    padding: 16px;
  }

  /* ===== Toast ===== */
  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }

  .toast {
    min-width: unset;
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    font-size: 0.85rem;
    word-break: break-word;
  }

  /* ===== Scanner ===== */
  .scanner-section {
    padding: 24px 16px;
  }

  .scanner-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
  }

  .scanner-title {
    font-size: 1rem;
  }

  .scanner-desc {
    font-size: 0.82rem;
  }

  /* ===== Pagination ===== */
  .pagination {
    flex-wrap: wrap;
  }

  .pagination button {
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }

  /* ===== Blob reduce for performance ===== */
  .blob {
    filter: blur(60px);
    opacity: 0.3;
  }

  .blob-1 { width: 300px; height: 300px; }
  .blob-2 { width: 250px; height: 250px; }
  .blob-3 { display: none; }
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
    border-radius: var(--radius-md);
  }

  .login-logo img {
    width: 110px !important;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .page-subtitle {
    font-size: 0.85rem;
  }

  /* Stats 1 column on very small */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Sidebar toggle smaller */
  .sidebar-toggle {
    width: 44px;
    height: 44px;
    top: 14px;
    left: 14px;
    font-size: 1rem;
  }

  .page-header {
    padding-top: 62px;
  }

  .sidebar-brand {
    padding-top: 70px;
  }

  /* Even smaller cards */
  .card-header {
    padding: 14px 12px;
  }

  .card-body {
    padding: 14px 12px;
  }

  .stat-value {
    font-size: 1.3rem;
  }
}

/* ============ Utility Classes ============ */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-purple {
  color: var(--primary-purple);
}
.text-muted {
  color: var(--text-secondary);
}
.mt-1 {
  margin-top: 8px;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}
.mb-1 {
  margin-bottom: 8px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}
.gap-1 {
  gap: 8px;
}
.gap-2 {
  gap: 16px;
}
.d-flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.flex-wrap {
  flex-wrap: wrap;
}
.hidden {
  display: none !important;
}

/* Logout fade-out overlay */
.logout-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-main, #f8faff);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: logoutFadeIn 0.35s ease forwards;
}
.logout-overlay .logout-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light, #e5e7eb);
  border-top-color: var(--primary-purple, #2563eb);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes logoutFadeIn {
  to { opacity: 1; }
}

/* ============ Monthly User Stats ============ */
.monthly-stats-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.6);
  transition: var(--transition-fast);
}

.monthly-stats-card:hover {
  box-shadow: var(--shadow-sm);
}

.monthly-stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(37,99,235,0.04), rgba(14,165,233,0.03));
  gap: 12px;
  user-select: none;
  -webkit-user-select: none;
}

.monthly-stats-header:active {
  background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(14,165,233,0.06));
}

.monthly-stats-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary-purple);
  flex-wrap: wrap;
}

.monthly-stats-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.monthly-chevron {
  transition: transform 0.25s ease;
}

.monthly-stats-card.collapsed .monthly-chevron {
  transform: rotate(-90deg);
}

.monthly-stats-body {
  padding: 8px 16px 14px;
  transition: max-height 0.3s ease;
}

.monthly-stats-card.collapsed .monthly-stats-body {
  display: none;
}

.monthly-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(37,99,235,0.06);
}

.monthly-user-row:last-child {
  border-bottom: none;
}

.monthly-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.monthly-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.monthly-user-detail {
  min-width: 0;
}

.monthly-user-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.monthly-user-meta {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 2px;
}

.monthly-user-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 120px;
}

.monthly-user-numbers {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.monthly-booking-count {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.monthly-sales-amount {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary-purple);
}

.monthly-bar-track {
  width: 100%;
  height: 5px;
  background: rgba(37,99,235,0.08);
  border-radius: 10px;
  overflow: hidden;
}

.monthly-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

@media (max-width: 768px) {
  .monthly-stats-header {
    padding: 12px 14px;
  }

  .monthly-stats-body {
    padding: 6px 14px 12px;
  }

  .monthly-user-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .monthly-user-stats {
    align-items: stretch;
    min-width: unset;
  }

  .monthly-user-numbers {
    justify-content: space-between;
  }
}

/* ============ ID Card Page - Mobile Card List ============ */
.idcard-header-actions {
  display: flex;
  gap: 8px;
}

.idcard-card-list {
  display: none;
}

.mobile-fab {
  display: none;
}

/* Mobile card items */
.idcard-item {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  overflow: hidden;
  word-break: break-word;
}

.idcard-item:active {
  transform: scale(0.99);
}

.idcard-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.idcard-item-num {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idcard-item-date {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.idcard-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.idcard-item-id {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--primary-purple);
  font-weight: 500;
  margin-bottom: 6px;
  font-family: 'Inter', monospace;
  letter-spacing: 0.5px;
  overflow: hidden;
  word-break: break-all;
}

/* Month group headers */
.month-group-header td {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06)) !important;
  border-bottom: 2px solid rgba(37, 99, 235, 0.15) !important;
  padding: 12px 18px !important;
  font-size: 0.92rem;
  color: var(--primary-purple);
}

.month-group-badge {
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  line-height: 1.6;
}

.month-group-header-mobile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  margin-top: 6px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(14, 165, 233, 0.06));
  border-radius: var(--radius-md);
  border: 1px solid rgba(37, 99, 235, 0.12);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-purple);
  overflow: hidden;
}

.month-group-header-mobile:first-child {
  margin-top: 0;
}

.idcard-item-phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--primary-purple);
  font-weight: 500;
  margin-bottom: 6px;
}

.idcard-item-address {
  display: flex;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.idcard-item-by {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 10px;
}

.idcard-item-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.idcard-item-actions .btn {
  font-size: 0.82rem;
  padding: 8px 12px;
  min-height: 38px;
}

/* Mobile FAB */
.mobile-fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 90;
  width: 56px;
  height: 56px;
  border: none;
  background: var(--gradient-btn);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transition: var(--transition-spring);
  align-items: center;
  justify-content: center;
}

.mobile-fab:hover {
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.5);
  transform: scale(1.08);
}

.mobile-fab:active {
  transform: scale(0.95);
}

@media (max-width: 768px) {
  /* Show mobile card list, hide desktop table */
  .idcard-table-view {
    display: none !important;
  }

  .idcard-card-list {
    display: block;
  }

  .idcard-card-list.hidden {
    display: none !important;
  }

  /* Hide desktop add button, show FAB */
  .desktop-add-btn {
    display: none !important;
  }

  .mobile-fab {
    display: flex;
  }

  /* Header actions - compact */
  .idcard-header-actions {
    width: 100%;
  }

  .idcard-header-actions .btn {
    flex: 1;
  }

  .idcard-header-actions .btn .btn-label {
    display: inline;
  }
}

@media (max-width: 480px) {
  .idcard-item {
    padding: 14px;
    margin-bottom: 10px;
  }

  .idcard-item-name {
    font-size: 0.95rem;
  }

  .idcard-item-id {
    font-size: 0.84rem;
  }

  .mobile-fab {
    bottom: 20px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
}
