/* ============================================
   HÒN TẰM BOOKING RECEIPT SYSTEM
   Design System & Component Styles
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* ============================================
   1. CSS VARIABLES / DESIGN TOKENS
   ============================================ */
:root {
  /* Brand Colors (Google Material) */
  --navy: #174ea6;
  --navy-light: #e8f0fe;
  --ocean: #1a73e8;
  --sky: #4285f4;
  --golden: #fbbc05;
  --golden-dark: #f9ab00;

  /* Semantic Colors */
  --success: #188038;
  --success-light: #ceead6;
  --danger: #d93025;
  --danger-light: #fce8e6;
  --warning: #f9ab00;
  --warning-light: #fef7e0;

  /* Neutral Palette */
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-300: #dadce0;
  --gray-400: #bdc1c6;
  --gray-500: #9aa0a6;
  --gray-600: #80868b;
  --gray-700: #5f6368;
  --gray-800: #3c4043;
  --white: #ffffff;

  /* Borders & Shadows */
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-md: 0 1px 2px 0 rgba(60,64,67,0.3), 0 2px 6px 2px rgba(60,64,67,0.15);
  --shadow-lg: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);

  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

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

  /* Aliases for component compatibility */
  --primary-color: var(--ocean);
  --text-color: var(--gray-800);
}

/* ============================================
   2. RESET & BASE TYPOGRAPHY
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px; /* Increased for better readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.3;
  color: var(--gray-800);
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p { margin-bottom: 0.75rem; }

a {
  color: var(--ocean);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--navy);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ============================================
   3. LAYOUT — SIDEBAR & MAIN CONTENT
   ============================================ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  background: var(--white);
  color: var(--gray-700);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--gray-800);
  letter-spacing: -0.02em;
}

.sidebar-brand .brand-subtitle {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: 12px 16px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--gray-700);
  border-radius: 0 24px 24px 0;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 4px;
}

.nav-item:hover {
  background: var(--gray-100);
  color: var(--gray-800);
  text-decoration: none;
}

.nav-item.active {
  background: var(--navy-light);
  color: var(--ocean);
  font-weight: 700;
}

.nav-item .nav-icon {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  color: var(--gray-500);
}

.nav-item:hover .nav-icon {
  color: var(--gray-700);
}

.nav-item.active .nav-icon {
  color: var(--ocean);
}

.nav-item .nav-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  background: var(--danger);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.user-info {
  border-top: 1px solid var(--gray-200);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ocean);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--white);
  flex-shrink: 0;
}

.user-info .user-details {
  flex: 1;
  min-width: 0;
}

.user-info .user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .user-role {
  font-size: 0.6875rem;
  color: var(--gray-500);
}

.user-info .logout-btn {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 4px;
  font-size: 1.125rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.user-info .logout-btn:hover {
  color: var(--danger);
}

.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background-color: var(--gray-50);
  padding: 32px;
}

/* ============================================
   4. LOGIN PAGE
   ============================================ */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--navy) 100%);
  padding: 20px;
}

.login-card {
  background: var(--white);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: 40px;
  border-radius: var(--radius-lg);
}

.login-card .login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .login-logo h1 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
}

.login-card .login-logo p {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.login-card .login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ============================================
   5. BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: 20px; /* Pill shape */
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.25px;
  line-height: 1.4;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  box-shadow: var(--shadow-md);
}

.btn:active {
  box-shadow: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.3);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Button Variants */
.btn-primary {
  background-color: var(--ocean);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--navy-light);
}

.btn-secondary {
  background-color: var(--gray-200);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background-color: var(--gray-300);
}

.btn-danger {
  background-color: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background-color: #c53030;
}

.btn-success {
  background-color: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background-color: #2f855a;
}

.btn-golden {
  background: linear-gradient(135deg, var(--golden) 0%, var(--golden-dark) 100%);
  color: var(--white);
}

.btn-golden:hover {
  background: linear-gradient(135deg, var(--golden-dark) 0%, #c88a30 100%);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  border-color: var(--ocean);
  color: var(--ocean);
  background: rgba(43, 108, 176, 0.04);
}

/* Button Sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* ============================================
   6. BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background-color: var(--warning-light);
  color: var(--warning);
}

.badge-danger {
  background-color: var(--danger-light);
  color: var(--danger);
}

.badge-info {
  background-color: #bee3f8;
  color: var(--ocean);
}

.badge-neutral {
  background-color: var(--gray-100);
  color: var(--gray-600);
}

/* ============================================
   7. CARDS
   ============================================ */
.card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.card-header h3 {
  font-size: 1.0625rem;
}

.card-body {
  /* default spacing */
}

.card-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

/* ============================================
   8. FORMS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-800);
  background-color: var(--white);
  transition: var(--transition);
  line-height: 1.5;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--gray-400);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: inset 0 0 0 1px var(--ocean);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background-color: var(--gray-100);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group select {
  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='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group .form-hint {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.form-group .form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* ============================================
   9. TABLES
   ============================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
}

table thead th {
  background-color: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

table thead th:first-child {
  border-top-left-radius: var(--radius-lg);
}

table thead th:last-child {
  border-top-right-radius: var(--radius-lg);
}

table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.8125rem;
  color: var(--gray-700);
  vertical-align: middle;
}

table tbody tr:nth-child(even) {
  background-color: var(--gray-50);
}

table tbody tr:hover {
  background-color: var(--gray-100);
}

table tbody tr:last-child td {
  border-bottom: none;
}

table tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-lg);
}

table tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-lg);
}

/* ============================================
   10. STEPS INDICATOR
   ============================================ */
.steps-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 0;
  margin-bottom: 32px;
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  max-width: 180px;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--gray-300);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.step-item.active .step-circle {
  background-color: var(--ocean);
  box-shadow: 0 0 0 4px rgba(43, 108, 176, 0.2);
}

.step-item.completed .step-circle {
  background-color: var(--success);
}

.step-label {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  text-align: center;
  white-space: nowrap;
}

.step-item.active .step-label {
  color: var(--ocean);
  font-weight: 600;
}

.step-item.completed .step-label {
  color: var(--success);
}

/* Connecting lines between steps */
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  background-color: var(--gray-300);
  z-index: 1;
}

.step-item.completed:not(:last-child)::after {
  background-color: var(--success);
}

/* ============================================
   11. SERVICE CARD (for service selection)
   ============================================ */
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: var(--transition);
  cursor: pointer;
}

.service-card:hover {
  border-left-color: var(--sky);
  box-shadow: var(--shadow);
}

.service-card.selected {
  border-left-color: var(--ocean);
  background-color: rgba(43, 108, 176, 0.03);
  box-shadow: var(--shadow);
}

.service-card .service-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-card .service-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.service-card.selected .service-checkbox {
  background-color: var(--ocean);
  border-color: var(--ocean);
  color: var(--white);
}

.service-card .service-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gray-800);
  flex: 1;
}

.service-card .service-price {
  font-weight: 600;
  color: var(--ocean);
  font-size: 0.875rem;
}

.service-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.service-inputs .form-group {
  margin-bottom: 0;
}

/* ============================================
   12. SUMMARY BOX (sticky sidebar)
   ============================================ */
.summary-box {
  position: sticky;
  top: 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.summary-box h3 {
  font-size: 1.0625rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.summary-row .summary-label {
  color: var(--gray-500);
}

.summary-row .summary-value {
  font-weight: 600;
  color: var(--gray-700);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  margin-top: 12px;
  border-top: 2px solid var(--navy);
  font-size: 1.125rem;
  font-weight: 700;
}

.summary-total .total-label {
  color: var(--gray-800);
}

.summary-total .total-value {
  color: var(--ocean);
  font-family: var(--font-heading);
  font-size: 1.375rem;
}

/* ============================================
   13. RECEIPT DISPLAY
   ============================================ */
.receipt-display {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.receipt-header {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 24px;
}

.receipt-header .receipt-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.receipt-header .receipt-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.receipt-header .receipt-id {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--gray-400);
  font-family: monospace;
}

.receipt-section {
  margin-bottom: 24px;
}

.receipt-section h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
}

.receipt-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}

.receipt-info .info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.receipt-info .info-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
}

.receipt-info .info-value {
  font-size: 0.875rem;
  color: var(--gray-800);
  font-weight: 600;
}

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.receipt-table thead th {
  background-color: var(--gray-100);
  color: var(--gray-700);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gray-200);
}

.receipt-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.8125rem;
}

.receipt-table .text-right {
  text-align: right;
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius);
  color: var(--white);
  margin-top: 20px;
}

.receipt-total .total-label {
  font-size: 1rem;
  font-weight: 600;
}

.receipt-total .total-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
}

.receipt-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--gray-300);
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ============================================
   14. QR CONTAINER
   ============================================ */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  max-width: 280px;
  margin: 16px auto;
  background: var(--white);
}

.qr-container img {
  max-width: 200px;
  height: auto;
}

.qr-container .qr-label {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
}

/* ============================================
   15. MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(10px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
  font-size: 1.125rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
  line-height: 1;
}

.modal-close:hover {
  color: var(--gray-700);
}

.modal-body {
  margin-bottom: 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

/* ============================================
   16. TOASTS / NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 300px;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: auto;
  animation: slideIn 0.35s ease forwards;
}

.toast-success {
  background-color: var(--success);
  color: var(--white);
}

.toast-error {
  background-color: var(--danger);
  color: var(--white);
}

.toast-info {
  background-color: var(--ocean);
  color: var(--white);
}

.toast-warning {
  background-color: var(--warning);
  color: var(--white);
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px;
  transition: var(--transition);
}

.toast-close:hover {
  color: var(--white);
}

/* ============================================
   17. FILTER BAR
   ============================================ */
.filter-bar,
.filter-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.filter-bar .form-group {
  margin-bottom: 0;
  min-width: 160px;
}

.filter-bar .form-group label {
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.filter-bar .form-group input,
.filter-bar .form-group select {
  padding: 8px 12px;
  font-size: 0.8125rem;
}

/* ============================================
   18. STATS GRID & STAT CARDS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  border-left: 4px solid var(--ocean);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card.stat-success { border-left-color: var(--success); }
.stat-card.stat-warning { border-left-color: var(--warning); }
.stat-card.stat-danger  { border-left-color: var(--danger); }
.stat-card.stat-golden  { border-left-color: var(--golden); }
.stat-card.stat-ocean   { border-left-color: var(--ocean); }
.stat-card.stat-navy    { border-left-color: var(--navy); }

.stat-card .stat-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  flex-shrink: 0;
}

.stat-card .stat-content {
  flex: 1;
  min-width: 0;
}

.stat-card .stat-number,
.stat-card .stat-value {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-800);
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 2px;
}

.stat-card .stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

.stat-card .stat-change.up   { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

/* ============================================
   19. BAR CHART
   ============================================ */
.bar-chart {
  padding: 16px 0;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.bar-label {
  width: 120px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.bar-fill,
.bar-chart-bar {
  height: 100%;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--ocean) 0%, var(--sky) 100%);
  transition: width 0.6s ease;
  min-width: 2px;
}

.bar-fill.bar-success { background: linear-gradient(135deg, var(--success) 0%, #48bb78 100%); }
.bar-fill.bar-golden  { background: linear-gradient(135deg, var(--golden-dark) 0%, var(--golden) 100%); }
.bar-fill.bar-danger  { background: linear-gradient(135deg, var(--danger) 0%, #fc8181 100%); }

.bar-value {
  width: 80px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700);
  flex-shrink: 0;
}

/* ============================================
   20. EMPTY STATE
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-state .empty-icon {
  font-size: 3rem;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.empty-state .empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.empty-state .empty-description {
  font-size: 0.875rem;
  color: var(--gray-400);
  max-width: 360px;
}

/* ============================================
   21. LOADING SPINNER
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ocean);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.loading-sm::after {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.loading-inline {
  display: inline-flex;
  padding: 0;
}

/* ============================================
   22. PAGE HEADER
   ============================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.5rem;
  color: var(--gray-800);
}

.page-header .page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.page-header .page-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 400;
}

/* ============================================
   23. CUSTOMER TYPE TOGGLE
   ============================================ */
.customer-type-toggle {
  display: inline-flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.customer-type-toggle .toggle-btn {
  padding: 10px 24px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
}

.customer-type-toggle .toggle-btn:hover {
  color: var(--gray-700);
}

.customer-type-toggle .toggle-btn.active {
  background-color: var(--ocean);
  color: var(--white);
  box-shadow: var(--shadow);
}

/* ============================================
   24. DISCOUNT ROW
   ============================================ */
.discount-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.discount-row .discount-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  min-width: 100px;
}

.discount-row input {
  max-width: 120px;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.discount-row input:focus {
  outline: none;
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.15);
}

.discount-row select {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: var(--font-body);
  background: var(--white);
  transition: var(--transition);
}

/* ============================================
   25. KEYFRAME ANIMATIONS
   ============================================ */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ============================================
   25.5. REPORT GRID
   ============================================ */
.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   26. UTILITY CLASSES
   ============================================ */
/* Text alignment */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

/* Spacing - Margins */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

/* Text helpers */
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-ocean { color: var(--ocean); }
.text-navy { color: var(--navy); }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Width */
.w-full { width: 100%; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }

/* Border */
.border-top { border-top: 1px solid var(--gray-200); }
.border-bottom { border-bottom: 1px solid var(--gray-200); }

/* Rounded */
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

/* ============================================
   27. RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 24px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .receipt-display {
    padding: 24px;
  }

  .receipt-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .form-group {
    min-width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header .page-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .steps-indicator {
    overflow-x: auto;
    padding: 16px 0;
    justify-content: flex-start;
  }

  .step-item {
    min-width: 100px;
  }

  .customer-type-toggle {
    width: 100%;
  }

  .customer-type-toggle .toggle-btn {
    flex: 1;
    text-align: center;
  }

  .summary-box {
    position: static;
  }

  .modal-content {
    width: 95%;
    padding: 24px;
  }

  .login-card {
    padding: 28px 24px;
  }

  .bar-label {
    width: 80px;
    font-size: 0.75rem;
  }

  .bar-value {
    width: 60px;
    font-size: 0.75rem;
  }

  .discount-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.875rem;
  }

  h1 { font-size: 1.375rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.0625rem; }

  .main-content {
    padding: 16px 12px;
  }

  .card {
    padding: 16px;
  }

  .receipt-display {
    padding: 16px;
  }

  table thead th,
  table tbody td {
    padding: 8px 10px;
    font-size: 0.75rem;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 40px);
  }
}

/* ============================================
   28. SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   29. SELECTION STYLING
   ============================================ */
::selection {
  background: rgba(43, 108, 176, 0.2);
  color: var(--gray-800);
}

/* ============================================
   30. MOBILE SIDEBAR TOGGLE
   ============================================ */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  transition: var(--transition);
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: var(--navy-light);
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: flex;
  }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 99;
}

.sidebar-overlay.active {
  display: block;
}
