/* ========================================
   FaciCare Rental - Flat Minimal Material Design System
   ======================================== */

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

:root {
  /* Colors - Keep existing palette */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --primary-dark: #3730A3;
  
  --accent: #06B6D4;
  --accent-hover: #0891B2;
  --accent-light: #ECFEFF;
  
  --success: #10B981;
  --success-light: #D1FAE5;
  
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  
  --error: #EF4444;
  --error-light: #FEE2E2;
  
  /* Neutral colors */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Shadows - Soft Material Design */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.03), 0 1px 2px 0 rgba(0, 0, 0, 0.02);
  --shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05), 0 2px 4px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 16px 0 rgba(0, 0, 0, 0.08), 0 4px 8px 0 rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 16px 32px 0 rgba(0, 0, 0, 0.12), 0 8px 16px 0 rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 24px 48px 0 rgba(0, 0, 0, 0.15), 0 12px 24px 0 rgba(0, 0, 0, 0.10);
  
  /* Border radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ========================================
   Global Styles
   ======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ========================================
   Buttons - Material Design
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space) var(--space-lg);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.btn-success:hover:not(:disabled) {
  background: #059669;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-outline {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  box-shadow: var(--shadow-xs);
}

.btn-outline:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
}

.btn-sm {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

/* ========================================
   Cards - Material Design Elevation
   ======================================== */

.card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--gray-300);
}

.card-elevated {
  box-shadow: var(--shadow);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* ========================================
   Badges & Pills
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

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

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

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

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

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

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

/* ========================================
   Form Elements
   ======================================== */

.input,
.select,
.textarea {
  width: 100%;
  padding: var(--space) var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gray-900);
  background: white;
  transition: all var(--transition);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input::placeholder {
  color: var(--gray-400);
}

.textarea {
  resize: vertical;
  min-height: 100px;
}

.label {
  display: block;
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

/* Checkbox & Radio */
.checkbox,
.radio {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
}

.radio {
  border-radius: var(--radius-full);
}

.checkbox:checked,
.radio:checked {
  background: var(--primary);
  border-color: var(--primary);
}

/* ========================================
   Alert Messages
   ======================================== */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 0.9375rem;
}

.alert-success {
  background: var(--success-light);
  border-color: var(--success);
  color: #065F46;
}

.alert-warning {
  background: var(--warning-light);
  border-color: var(--warning);
  color: #92400E;
}

.alert-error {
  background: var(--error-light);
  border-color: var(--error);
  color: #991B1B;
}

.alert-info {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #1E40AF;
}

/* ========================================
   Loading & Spinners
   ======================================== */

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ========================================
   Grid & Layout
   ======================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

.flex {
  display: flex;
  gap: var(--space);
}

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

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

/* ========================================
   Animations
   ======================================== */

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

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fadeIn {
  animation: fadeIn var(--transition-slow);
}

.animate-slideUp {
  animation: slideUp var(--transition-slow);
}

.animate-slideDown {
  animation: slideDown var(--transition-slow);
}

.animate-scaleIn {
  animation: scaleIn var(--transition-slow);
}

/* ========================================
   Utilities
   ======================================== */

.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-gray { color: var(--gray-600); }
.text-muted { color: var(--gray-500); }

.bg-primary { background: var(--primary); }
.bg-accent { background: var(--accent); }
.bg-success { background: var(--success); }
.bg-gray-50 { background: var(--gray-50); }
.bg-white { background: white; }

.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ========================================
   Responsive Typography
   ======================================== */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
}

/* ========================================
   ADMIN PRODUCTS PAGE - ENHANCED DESIGN
   ======================================== */

/* Admin Page Container */
.admin-page {
  padding: var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
  animation: fadeIn 0.3s ease;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 2px solid var(--gray-200);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: var(--space);
  margin-bottom: var(--space-sm);
}

.page-title i {
  color: var(--primary);
  font-size: 1.75rem;
}

.page-subtitle {
  color: var(--gray-600);
  font-size: 0.9375rem;
  margin: 0;
}

/* Stats Row - Enhanced Material Design */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  transition: width var(--transition);
}

.stat-card.blue::before { background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.amber::before { background: var(--warning); }
.stat-card.red::before { background: var(--error); }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.stat-card:hover::before {
  width: 8px;
}

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

.stat-card:hover .icon {
  transform: scale(1.1) rotate(5deg);
}

.stat-card.blue .icon {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-light));
  color: var(--primary);
}

.stat-card.green .icon {
  background: linear-gradient(135deg, var(--success-light), var(--success-light));
  color: var(--success);
}

.stat-card.amber .icon {
  background: linear-gradient(135deg, var(--warning-light), var(--warning-light));
  color: var(--warning);
}

.stat-card.red .icon {
  background: linear-gradient(135deg, var(--error-light), var(--error-light));
  color: var(--error);
}

.stat-card .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card .label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* Toolbar - Enhanced Design */
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space);
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-wrap i {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-wrap .input-base,
.search-wrap .input {
  padding-left: calc(var(--space-xl) + 4px);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.search-wrap .input-base:focus,
.search-wrap .input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  outline: none;
}

.input-base,
.select-base {
  padding: var(--space) var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gray-900);
  background: white;
  transition: all var(--transition);
}

.input-base:focus,
.select-base:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.select-base {
  cursor: pointer;
}

/* Category Chips - Modern Pills */
.chips {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.chip {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  background: white;
  color: var(--gray-700);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.chip:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.chip.active:hover {
  background: var(--primary-hover);
}

/* Table Card - Enhanced Material Design */
.table-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.table-card:hover {
  box-shadow: var(--shadow);
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.table-wrap thead {
  background: linear-gradient(to bottom, var(--gray-50), white);
  border-bottom: 2px solid var(--gray-200);
}

.table-wrap th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.table-wrap tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

.table-wrap tbody tr:hover {
  background: var(--gray-50);
}

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

.table-wrap td {
  padding: var(--space-md) var(--space-lg);
  color: var(--gray-900);
  vertical-align: middle;
}

/* Product Info in Table */
.prod-info {
  display: flex;
  align-items: center;
  gap: var(--space);
}

.prod-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--gray-200);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.prod-info:hover .prod-img {
  transform: scale(1.1);
  border-color: var(--primary);
}

.prod-info .txt {
  flex: 1;
}

.prod-info .name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.prod-info .name-en {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* Status Badges in Table */
.badge.available {
  background: var(--success-light);
  color: var(--success);
}

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

/* Action Buttons */
.actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.875rem;
}

.btn-icon:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}

.btn-icon.edit:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-icon.img:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent);
}

.btn-icon.delete:hover {
  color: var(--error);
  background: var(--error-light);
  border-color: var(--error);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Addon & Rental Count Buttons - Simple Text Style */
.btn-addon-count,
.btn-rental-count {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-addon-count:hover,
.btn-rental-count:hover {
  background: transparent;
  border: none;
  transform: none;
  box-shadow: none;
  color: var(--primary-dark);
}

.btn-addon-count i,
.btn-rental-count i {
  font-size: 0.75rem;
}

/* Table Footer */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  flex-wrap: wrap;
  gap: var(--space);
}

.table-info {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.pagination {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 var(--space);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: white;
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--gray-500);
}

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

.empty-state .txt {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* Loading State */
.loading {
  text-align: center;
  padding: var(--space-2xl);
}

.loading .spinner {
  margin: 0 auto var(--space);
}

/* Secondary Button */
.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-300);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--gray-400);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Modal Styles - Enhanced */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

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

.modal {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-slow);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(to bottom, var(--gray-50), white);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: var(--space);
  margin: 0;
}

.modal-title i {
  color: var(--primary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space);
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* Form Styles - Enhanced */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required {
  color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space) var(--space-md);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--gray-900);
  background: white;
  transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

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

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  user-select: none;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
}

.form-checkbox input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.form-checkbox span {
  font-size: 0.9375rem;
  color: var(--gray-700);
  font-weight: 500;
}

/* Album Grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space);
}

.album-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  transition: all var(--transition);
}

.album-item:hover {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-item .actions {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  opacity: 0;
  transition: opacity var(--transition);
}

.album-item:hover .actions {
  opacity: 1;
}

.cover-badge {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Addon List */
.addon-list {
  display: flex;
  flex-direction: column;
  gap: var(--space);
}

.addon-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  transition: all var(--transition);
}

.addon-item:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-xs);
}

.addon-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--gray-200);
  flex-shrink: 0;
}

.addon-info {
  flex: 1;
}

.addon-name {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.addon-name-en {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.addon-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

.addon-stock {
  flex-shrink: 0;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: var(--space) var(--space-md);
  text-align: left;
}

.data-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.875rem;
  border-bottom: 2px solid var(--gray-200);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--gray-100);
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .admin-page {
    padding: var(--space-lg);
  }
  
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .toolbar {
    flex-wrap: wrap;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space);
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
  
  .table-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .modal {
    width: 95%;
    max-height: 95vh;
  }
}

/* ==================== PDP FORCE OVERRIDE ==================== */
/* Force remove all borders and backgrounds from PDP elements */
/* Using maximum specificity */

div[class*="pdp-plan"],
.pdp-plan,
.pdp-plan:hover,
.pdp-plan.selected,
.pdp-plan.popular,
div.pdp-plan,
div.pdp-plan:hover,
div.pdp-plan.selected,
div.pdp-plan.popular {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  outline: none !important;
}

div[class*="pdp-plan-header"],
div[class*="pdp-plan-body"],
div[class*="pdp-plan-note"],
.pdp-plan-header,
.pdp-plan-body,
.pdp-plan-note {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
}

div[class*="pdp-addon"],
.pdp-addon,
.pdp-addon:hover,
.pdp-addon.selected {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  outline: none !important;
}

div[class*="pdp-addon-info"],
.pdp-addon-info {
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  outline: none !important;
}

/* ==================== CART PAGE - MODERN UI ==================== */

.cart-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Empty State */
.cart-empty-state {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  font-size: 8rem;
  color: var(--gray-200);
  margin-bottom: 2rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.empty-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 1rem;
}

.empty-text {
  font-size: 1.125rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
  max-width: 500px;
}

.btn-browse-products {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.btn-browse-products:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Cart Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--gray-200);
}

.cart-title-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0;
}

.cart-title i {
  color: var(--primary);
}

.cart-subtitle {
  font-size: 1rem;
  color: var(--ink-3);
  margin: 0;
}

.btn-continue-shopping {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--primary);
  font-weight: 600;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-continue-shopping:hover {
  background: var(--primary-light);
  transform: translateX(-4px);
}

/* Cart Content Layout */
.cart-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
  max-width: 100%; /* Prevent overflow */
}

/* Cart Items Section */
.cart-items-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0; /* Allow shrinking */
  overflow: hidden; /* Prevent child overflow */
}

/* Cart Item Card */
.cart-item {
  display: grid;
  grid-template-columns: 32px 100px 1fr 120px 110px 100px 36px;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-width: 0; /* Allow grid items to shrink */
}

.cart-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Checkbox */
.item-checkbox {
  position: relative;
}

.item-select {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

/* Image */
.item-image-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-50);
  flex-shrink: 0;
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Details */
.item-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0; /* Allow content to shrink */
  overflow: hidden; /* Prevent overflow */
}

.item-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.item-variant {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-3);
  margin: 0;
}

.item-variant i {
  color: var(--primary);
}

.item-price-mobile {
  display: none;
}

/* Price Desktop */
.item-price-desktop {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.price-per-unit {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.price-unit {
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* Quantity Controls */
.item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.1);
}

.qty-btn:active {
  transform: scale(0.95);
}

.qty-input {
  width: 50px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-1);
  border: none;
  background: transparent;
  outline: none;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Item Total */
.item-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.total-label {
  font-size: 0.75rem;
  color: var(--ink-3);
  text-transform: uppercase;
}

.total-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-1);
}

.total-unit {
  font-size: 0.875rem;
  color: var(--ink-3);
}

/* Remove Button */
.item-remove {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid var(--error-light);
  border-radius: var(--radius);
  color: var(--error);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.item-remove:hover {
  background: var(--error);
  color: white;
  transform: scale(1.1);
}

/* Summary Section */
.cart-summary-section {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.summary-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 2px solid var(--primary-light);
}

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

.summary-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0;
}

.summary-badge {
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
}

/* Summary Details */
.summary-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.summary-row.highlight {
  padding: 0.75rem;
  background: var(--success-light);
  border-radius: var(--radius);
}

.summary-row.total {
  padding-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.summary-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
}

.summary-row.total .summary-label {
  color: var(--ink-1);
}

.summary-value {
  font-weight: 600;
  color: var(--ink-1);
}

.summary-value.free {
  color: var(--success);
  font-weight: 700;
}

.summary-row.total .summary-value {
  color: var(--primary);
  font-size: 1.75rem;
}

.summary-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.5rem 0;
}

/* Summary Actions */
.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-checkout:active {
  transform: translateY(0);
}

.secure-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.secure-notice i {
  color: var(--success);
}

/* Promo Card */
.promo-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: var(--accent-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.promo-card i {
  font-size: 2rem;
}

.promo-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.promo-text strong {
  font-size: 1rem;
  font-weight: 700;
}

.promo-text span {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .cart-content {
    grid-template-columns: 1fr 340px;
    gap: 1rem;
  }
  
  .cart-item {
    grid-template-columns: 28px 90px 1fr 110px 100px 90px 32px;
    gap: 0.5rem;
    padding: 0.875rem;
  }
  
  .item-image-wrapper {
    width: 90px;
    height: 90px;
  }
}

@media (max-width: 992px) {
  .cart-content {
    grid-template-columns: 1fr;
  }
  
  .cart-summary-section {
    position: static;
    order: -1;
  }
  
  .cart-item {
    grid-template-columns: 40px 100px 1fr 100px 40px;
    gap: 1rem;
  }
  
  .item-price-desktop,
  .item-total {
    display: none;
  }
  
  .item-price-mobile {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
  }
  
  .price-label {
    color: var(--ink-3);
  }
  
  .price-value {
    font-weight: 700;
    color: var(--primary);
  }
}

@media (max-width: 640px) {
  .cart-title {
    font-size: 1.75rem;
  }
  
  .cart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .btn-continue-shopping {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
  }
  
  .cart-item {
    grid-template-columns: 80px 1fr 100px 32px;
    gap: 0.75rem;
    padding: 1rem;
  }
  
  .item-checkbox {
    display: none;
  }
  
  .item-image-wrapper {
    width: 80px;
    height: 80px;
  }
  
  .item-name {
    font-size: 1rem;
  }
  
  .item-quantity {
    padding: 0.25rem;
  }
  
  .qty-btn {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  
  .qty-input {
    width: 40px;
    font-size: 0.875rem;
  }
  
  .item-remove {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
}

/* ==================== CHECKOUT PAGE ==================== */

.checkout-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Progress Steps */
.checkout-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 2rem 1rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.step-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--ink-3);
  border-radius: 50%;
  font-size: 1.5rem;
  border: 3px solid var(--gray-200);
  transition: all 0.3s ease;
}

.progress-step.completed .step-icon,
.progress-step.active .step-icon {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-3);
}

.progress-step.completed .step-label,
.progress-step.active .step-label {
  color: var(--primary);
}

.progress-line {
  width: 120px;
  height: 3px;
  background: var(--gray-200);
  margin: 0 1rem;
}

.progress-line.active {
  background: var(--primary);
}

/* Header */
.checkout-header {
  text-align: center;
  margin-bottom: 2rem;
}

.checkout-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0 0 0.5rem 0;
}

.checkout-title i {
  color: var(--primary);
}

.checkout-subtitle {
  font-size: 1rem;
  color: var(--ink-3);
  margin: 0;
}

/* Content Layout */
.checkout-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
}

/* Form Section */
.checkout-form-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Form Card */
.form-card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: visible;
  transition: all 0.2s ease;
  margin-bottom: 2rem;
}

.form-card:last-child {
  margin-bottom: 0;
}

.form-card:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, #f0f9ff, #ffffff);
  border-bottom: 2px solid #3b82f6;
}

.card-header i {
  font-size: 1.5rem;
  color: #3b82f6;
  background: #dbeafe;
  padding: 0.5rem;
  border-radius: 8px;
}

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0;
  flex: 1;
}

.required-badge {
  padding: 0.25rem 0.75rem;
  background: var(--error);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius);
}

.optional-badge {
  padding: 0.25rem 0.75rem;
  background: var(--gray-400);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius);
}

.card-body {
  padding: 1.5rem;
}

/* Form Elements */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-label.required::after {
  content: '*';
  color: #dc2626;
  margin-left: 0.25rem;
}

.form-input,
.form-textarea {
  padding: 0.875rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  color: #1f2937;
  transition: all 0.2s ease;
  background: white;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.form-hint {
  font-size: 0.875rem;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.form-hint i {
  color: var(--primary);
}

/* Map */
.checkout-map {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--gray-200);
  margin-top: 0.5rem;
  background: var(--gray-50);
}

.map-search-box {
  margin: 10px;
  padding: 10px 15px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-size: 14px;
  width: 300px;
  box-shadow: var(--shadow-md);
}

.map-coords {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--primary-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--primary-dark);
}

.map-coords i {
  color: var(--primary);
}

/* Map Instruction */
.map-instruction {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--info-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--info-dark);
  margin-bottom: 0.75rem;
}

.map-instruction i {
  color: var(--warning);
  flex-shrink: 0;
}

/* Map Examples */
.map-examples {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.map-examples strong {
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.map-examples strong i {
  color: var(--primary);
}

.example-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.example-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--primary);
}

.example-tag:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Manual Coordinates Input */
.manual-coords {
  margin-top: 1rem;
}

.manual-coords details {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
}

.manual-coords summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  font-weight: 500;
  padding: 0.5rem;
  user-select: none;
}

.manual-coords summary:hover {
  color: var(--primary);
}

.manual-coords summary i {
  color: var(--primary);
}

.coords-input-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: white;
  border-radius: var(--radius);
}

.coords-input, .map-link-input {
  flex: 1;
  padding: 0.625rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.coords-input:focus, .map-link-input:focus {
  outline: none;
  border-color: var(--primary);
}

.map-link-input {
  min-width: 200px;
}

@media (max-width: 768px) {
  .map-link-input {
    min-width: unset;
  }
}

.btn-set-coords {
  padding: 0.625rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-set-coords:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Leaflet Control Styles */
.leaflet-control-locate {
  background: white !important;
  width: 30px !important;
  height: 30px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.leaflet-control-locate:hover {
  background: var(--primary-light) !important;
}

.leaflet-control-locate i {
  color: var(--primary) !important;
  font-size: 18px !important;
}

/* Map Search Control */
.leaflet-control-search {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.search-box-container {
  position: relative;
  width: 320px;
  margin: 10px;
}

.map-search-input {
  width: 100%;
  padding: 10px 45px 10px 15px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  font-size: 14px;
  background: white;
  box-shadow: var(--shadow-md);
  outline: none;
  transition: all 0.3s ease;
}

.map-search-input:focus {
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

.map-search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.map-search-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.05);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
}

.search-result-item {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 12px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: all 0.2s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-light);
}

.search-result-item i {
  color: var(--primary);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.result-text {
  flex: 1;
  min-width: 0;
}

.result-name {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.4;
  word-wrap: break-word;
}

.search-loading,
.search-no-results,
.search-error {
  padding: 15px;
  text-align: center;
  color: var(--gray-600);
  font-size: 14px;
}

.search-loading i {
  color: var(--primary);
  margin-right: 8px;
}

.search-no-results i {
  color: var(--info);
  margin-right: 8px;
}

.search-error {
  color: var(--error);
}

.search-error i {
  margin-right: 8px;
}

/* Upload Section */
.upload-intro {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--accent-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--accent-dark);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.upload-intro i {
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.upload-item {
  display: flex;
  flex-direction: column;
}

.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 320px;
  height: 320px;
  overflow-y: auto;
}

.upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-4px);
}

.upload-box i {
  font-size: 3rem;
  color: var(--gray-400);
  transition: all 0.3s ease;
}

.upload-box:hover i {
  color: var(--primary);
  transform: scale(1.1);
}

.upload-box.uploading {
  border-color: var(--accent);
  background: var(--accent-light);
  pointer-events: none;
}

.upload-box.uploading i {
  color: var(--accent);
}

.upload-box.uploaded {
  border-color: var(--success);
  background: var(--success-light);
  border-style: solid;
}

.upload-box.uploaded i {
  color: var(--success);
}

.upload-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
}

.upload-hint {
  font-size: 0.75rem;
  color: var(--ink-4);
  text-align: center;
}

.upload-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  gap: 0.5rem;
}

.upload-status {
  font-size: 0.875rem;
  color: var(--ink-3);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status i {
  font-size: 1rem;
  margin-right: 0.25rem;
}

.upload-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--success-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--success-dark);
}

.upload-notice i {
  font-size: 1.25rem;
  color: var(--success);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.checkbox-label a {
  color: var(--primary);
  text-decoration: underline;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: sticky;
  bottom: 1rem;
  z-index: 10;
}

.btn-back,
.btn-draft,
.btn-submit {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back {
  background: white;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.btn-back:hover {
  background: #f9fafb;
  border-color: #6b7280;
}

.btn-draft {
  background: white;
  color: #4b5563;
  border: 1px solid #9ca3af;
}

.btn-draft:hover {
  background: #f3f4f6;
  border-color: #6b7280;
}

.btn-submit {
  background: #10b981;
  color: white;
  border: 1px solid #10b981;
}

.btn-submit:hover {
  background: #059669;
  border-color: #059669;
}

/* Summary Sidebar */
.checkout-summary-section {
  position: sticky;
  top: 6rem;
}

.summary-card.sticky {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  border: 2px solid var(--primary-light);
}

.summary-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-1);
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-200);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.summary-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 1rem;
  align-items: center;
}

.item-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--gray-200);
}

.item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-1);
  line-height: 1.4;
}

.item-meta {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.item-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

.summary-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.5rem 0;
}

.summary-totals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--accent-light);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--accent-dark);
  margin-top: 1rem;
}

.summary-note i {
  color: var(--accent);
  font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .checkout-content {
    grid-template-columns: 1fr;
  }
  
  .checkout-summary-section {
    position: static;
    order: -1;
  }
  
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .checkout-progress {
    padding: 1rem;
  }
  
  .step-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .progress-line {
    width: 60px;
    margin: 0 0.5rem;
  }
  
  .step-label {
    font-size: 0.75rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .checkout-map {
    height: 300px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .search-box-container {
    width: 260px;
    margin: 8px;
  }
  
  .map-search-input {
    padding: 8px 40px 8px 12px;
    font-size: 13px;
  }
  
  .map-search-btn {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 640px) {
  .checkout-title {
    font-size: 1.5rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .upload-box {
    padding: 1.5rem 1rem;
    min-height: 160px;
  }
  
  .upload-box i {
    font-size: 2rem;
  }
}

/* ============================================
   TERMS OF SERVICE PAGE - MODERN LEGAL DOC UI
   ============================================ */

.terms-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
  padding: 2rem 1rem;
}

.terms-container {
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
}

/* Header */
.terms-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.terms-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
  background-size: cover;
  opacity: 0.3;
}

.terms-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  position: relative;
  z-index: 1;
}

.terms-title i {
  font-size: 2.25rem;
  margin-right: 1rem;
  vertical-align: middle;
}

.terms-subtitle {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 400;
  margin: 0 0 1.5rem 0;
  position: relative;
  z-index: 1;
}

.terms-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.875rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.terms-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terms-meta i {
  font-size: 1rem;
}

/* Content */
.terms-content {
  padding: 3rem 2rem;
}

/* Section */
.terms-section {
  margin-bottom: 3rem;
  position: relative;
  padding-left: 4rem;
}

.section-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 1.5rem 0;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 2px;
}

.section-content {
  color: var(--gray-700);
  line-height: 1.8;
}

.section-content p {
  margin: 0 0 1rem 0;
}

.section-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 2rem 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-content h3::before {
  content: '';
  width: 4px;
  height: 1.25rem;
  background: var(--primary);
  border-radius: 2px;
}

.section-content ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.section-content ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
}

.section-content ul li::before {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  color: var(--success);
  font-size: 1rem;
}

/* Special Elements */
.definition-list {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.definition-item {
  padding: 1rem;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-xs);
}

.definition-item:last-child {
  margin-bottom: 0;
}

.definition-item strong {
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

/* Package List */
.package-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.package-item {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.package-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.package-item i {
  font-size: 2rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.75rem;
}

.package-item strong {
  display: block;
  color: var(--gray-800);
  font-size: 1.125rem;
}

/* Cancellation Policy */
.cancellation-policy {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--danger);
}

.policy-item {
  padding: 1rem;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.policy-item:last-child {
  margin-bottom: 0;
}

.policy-item strong {
  color: var(--danger);
  min-width: 180px;
}

/* Damage Types */
.damage-types {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.damage-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--warning);
}

.damage-item i {
  font-size: 1.5rem;
  color: var(--warning);
  margin-top: 0.25rem;
}

.damage-item strong {
  color: var(--gray-800);
  display: block;
  margin-bottom: 0.25rem;
}

/* Disclaimer Box */
.disclaimer-box {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 2px solid var(--warning);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 1.5rem 0;
}

.disclaimer-box h3 {
  color: var(--warning-dark);
  font-size: 1.375rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.disclaimer-box h3::before {
  display: none;
}

.disclaimer-box h3 i {
  font-size: 1.5rem;
}

.disclaimer-box ul li::before {
  color: var(--warning);
}

/* Medical Disclaimer */
.medical-disclaimer {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 2px solid var(--info);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.medical-disclaimer i {
  font-size: 1.5rem;
  color: var(--info);
  margin-top: 0.25rem;
}

.medical-disclaimer strong {
  color: var(--info-dark);
}

/* Contact Section */
.contact-section .section-number {
  background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
  font-size: 1.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.contact-card {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.contact-card:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.contact-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: block;
}

.contact-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 0.75rem 0;
}

.contact-card p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.6;
}

/* Accept Terms Box */
.accept-terms {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 2px solid var(--success);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin: 2rem 0 0 0;
  text-align: center;
}

.accept-terms p {
  margin: 0;
  color: var(--gray-800);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.accept-terms i {
  font-size: 1.5rem;
  color: var(--success);
}

/* Footer */
.terms-footer {
  background: var(--gray-50);
  padding: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--gray-200);
}

.terms-footer button {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back {
  background: var(--gray-200);
  color: var(--gray-800);
}

.btn-back:hover {
  background: var(--gray-300);
  transform: translateX(-4px);
}

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

.btn-print:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

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

.btn-top:hover {
  background: var(--success-dark);
  transform: translateY(-2px);
}

/* Print Styles */
@media print {
  .terms-page {
    background: white;
    padding: 0;
  }
  
  .terms-header {
    background: none !important;
    color: black !important;
    page-break-after: avoid;
  }
  
  .terms-footer {
    display: none;
  }
  
  .terms-section {
    page-break-inside: avoid;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .terms-page {
    padding: 1rem 0.5rem;
  }
  
  .terms-header {
    padding: 2rem 1rem;
  }
  
  .terms-title {
    font-size: 1.75rem;
  }
  
  .terms-title i {
    font-size: 1.5rem;
  }
  
  .terms-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .terms-content {
    padding: 2rem 1rem;
  }
  
  .terms-section {
    padding-left: 3rem;
  }
  
  .section-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.375rem;
  }
  
  .package-list {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .terms-footer {
    padding: 1.5rem 1rem;
  }
  
  .terms-footer button {
    width: 100%;
    justify-content: center;
  }
}
