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

/* ============================================
   WashAndGo - Mobile-First Responsive CSS
   Laundry Service App
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Brand colors */
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-light: #E0E7FF;
  --success: #059669;
  --success-light: #D1FAE5;
  --warning: #D97706;
  --warning-light: #FEF3C7;
  --danger: #DC2626;
  --danger-light: #FEE2E2;
  --purple: #7C3AED;
  --purple-light: #EDE9FE;
  --cyan: #0891B2;
  --cyan-light: #CFFAFE;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #7C3AED 100%);
  --gradient-primary-soft: linear-gradient(135deg, #818CF8 0%, #6366F1 100%);
  --gradient-success: linear-gradient(135deg, #34D399 0%, #059669 100%);
  --gradient-app-bg: linear-gradient(180deg, #F5F7FF 0%, #FBFBFE 40%, #FFFFFF 100%);
  --gradient-auth-bg: linear-gradient(150deg, #EEF2FF 0%, #F5F3FF 45%, #FAF5FF 100%);

  /* Neutral / surface scale (theme-aware) */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --white: #FFFFFF;

  /* Semantic surfaces */
  --app-bg: var(--gradient-app-bg);
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E2E8F0;
  --overlay-bg: rgba(15, 23, 42, 0.45);
  --nav-bg: rgba(255, 255, 255, 0.82);

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --body-font-size: 14px;
  --body-line-height: 1.5;
  --h1-size: 26px;
  --h2-size: 21px;
  --h3-size: 16px;

  /* Layout */
  --max-width: 480px;
  --top-bar-height: 60px;
  --bottom-nav-height: 64px;
  --content-padding: 16px;
  --top-padding: 60px;
  --bottom-padding: 78px;

  /* Shadows (soft, colored) */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12), 0 6px 12px rgba(15, 23, 42, 0.06);
  --shadow-primary: 0 8px 22px rgba(79, 70, 229, 0.35);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

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

/* --- Dark theme tokens --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary-light: #312E81;
    --success-light: #064E3B;
    --warning-light: #4A3210;
    --danger-light: #4C1D1D;
    --purple-light: #3B2A6B;
    --cyan-light: #134E5A;

    --gradient-app-bg: linear-gradient(180deg, #0B1120 0%, #0F172A 100%);
    --gradient-auth-bg: linear-gradient(150deg, #131a2e 0%, #1a1730 50%, #1f1733 100%);

    --gray-50: #0F172A;
    --gray-100: #1E293B;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748B;
    --gray-500: #94A3B8;
    --gray-600: #CBD5E1;
    --gray-700: #E2E8F0;
    --gray-800: #F1F5F9;
    --gray-900: #F8FAFC;
    --white: #1E293B;

    --app-bg: var(--gradient-app-bg);
    --surface: #1E293B;
    --surface-2: #0F172A;
    --border: #334155;
    --overlay-bg: rgba(2, 6, 23, 0.6);
    --nav-bg: rgba(30, 41, 59, 0.82);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.6);
    --shadow-primary: 0 8px 22px rgba(99, 102, 241, 0.45);
  }
}

/* --- Manual dark theme (toggle) --- */
[data-theme="dark"] {
  --primary-light: #312E81;
  --success-light: #064E3B;
  --warning-light: #4A3210;
  --danger-light: #4C1D1D;
  --purple-light: #3B2A6B;
  --cyan-light: #134E5A;

  --gradient-app-bg: linear-gradient(180deg, #0B1120 0%, #0F172A 100%);
  --gradient-auth-bg: linear-gradient(150deg, #131a2e 0%, #1a1730 50%, #1f1733 100%);

  --gray-50: #0F172A;
  --gray-100: #1E293B;
  --gray-200: #334155;
  --gray-300: #475569;
  --gray-400: #64748B;
  --gray-500: #94A3B8;
  --gray-600: #CBD5E1;
  --gray-700: #E2E8F0;
  --gray-800: #F1F5F9;
  --gray-900: #F8FAFC;
  --white: #1E293B;

  --app-bg: var(--gradient-app-bg);
  --surface: #1E293B;
  --surface-2: #0F172A;
  --border: #334155;
  --overlay-bg: rgba(2, 6, 23, 0.6);
  --nav-bg: rgba(30, 41, 59, 0.82);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 8px 22px rgba(99, 102, 241, 0.45);
}

/* --- Base Reset & Global Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--body-font-size);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  color: var(--gray-800);
  background: var(--app-bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

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

ul, ol {
  list-style: none;
}

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

h1 {
  font-size: var(--h1-size);
}

h2 {
  font-size: var(--h2-size);
}

h3 {
  font-size: var(--h3-size);
}

p {
  color: var(--gray-600);
  margin-bottom: 12px;
}

/* --- Layout Wrapper --- */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--white);
  position: relative;
}

/* --- Top Bar --- */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--top-bar-height);
  background-color: var(--white);
  box-shadow: var(--shadow);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--content-padding);
}

.top-bar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar .logo .app-icon {
  width: 32px;
  height: 32px;
  background-color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

.top-bar .logo .app-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}

.top-bar .lang-toggle {
  background: none;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}

.top-bar .lang-toggle:hover {
  background-color: var(--gray-100);
}

.top-bar .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar .user-info .greeting {
  font-size: 12px;
  color: var(--gray-500);
}

.top-bar .user-info .user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.top-bar .user-info .logout-btn {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 4px;
}

.top-bar .user-info .logout-btn:hover {
  text-decoration: underline;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--bottom-nav-height);
  background-color: var(--white);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 8px;
}

.bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-400);
  background: none;
  border: none;
  font-family: inherit;
  min-width: 60px;
}

.bottom-nav .nav-item .nav-icon {
  font-size: 20px;
  line-height: 1;
}

.bottom-nav .nav-item .nav-label {
  font-size: 10px;
  font-weight: 500;
}

.bottom-nav .nav-item.active {
  color: var(--primary);
}

.bottom-nav .nav-item.active .nav-label {
  font-weight: 700;
}

.bottom-nav .nav-item:hover {
  color: var(--primary);
}

/* --- Views / Pages --- */
.view {
  display: none;
  padding: var(--content-padding);
  padding-top: var(--top-padding);
  padding-bottom: var(--bottom-padding);
  min-height: 100vh;
}

.view.active {
  display: block;
}

.view-header {
  position: sticky;
  top: var(--top-bar-height);
  background-color: var(--gray-50);
  padding: var(--content-padding);
  margin: calc(-1 * var(--content-padding));
  margin-bottom: var(--content-padding);
  z-index: 50;
}

.view-header .view-title {
  font-size: var(--h2-size);
  font-weight: 700;
  color: var(--gray-900);
}

.view-header .view-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* --- Auth Forms --- */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--top-padding) - var(--bottom-padding));
  padding: var(--content-padding);
}

.auth-card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 24px;
  width: 100%;
  max-width: 400px;
  animation: fadeIn 0.3s ease;
}

.auth-card .auth-title {
  font-size: var(--h2-size);
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 8px;
}

.auth-card .auth-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 24px;
}

.auth-card .auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: 12px;
}

.auth-card .auth-divider::before,
.auth-card .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--gray-200);
}

.auth-card .auth-link {
  text-align: center;
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 16px;
}

.auth-card .auth-link a {
  font-weight: 600;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--white);
  transition: var(--transition);
}

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

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

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

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px var(--danger-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

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

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

.form-help {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 4px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 1px;
}

.form-checkbox label {
  font-size: 13px;
  color: var(--gray-600);
  cursor: pointer;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

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

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

.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: #B91C1C;
}

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

.btn-success:hover {
  background-color: #15803D;
}

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

.btn-outline:hover {
  background-color: var(--gray-100);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

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

.btn-block {
  display: flex;
  width: 100%;
}

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

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

/* --- Cards --- */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--content-padding);
  margin-bottom: 12px;
  transition: var(--transition);
}

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

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-header .card-title {
  font-size: var(--h3-size);
  font-weight: 600;
  color: var(--gray-900);
}

.card-header .card-subtitle {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.card-body {
  color: var(--gray-600);
  font-size: 14px;
}

.card-footer {
  border-top: 1px solid var(--gray-100);
  padding-top: 12px;
  margin-top: 12px;
}

/* --- Summary Cards --- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}

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

.summary-card .summary-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.summary-card .summary-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.summary-card .summary-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.summary-card.success .summary-value {
  color: var(--success);
}

.summary-card.warning .summary-value {
  color: var(--warning);
}

.summary-card.danger .summary-value {
  color: var(--danger);
}

.summary-card.purple .summary-value {
  color: var(--purple);
}

/* --- Status Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

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

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

.badge-picked_up,
.badge-picked-up {
  background-color: var(--purple-light);
  color: var(--purple);
}

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

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

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

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

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

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

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

.badge-sm {
  padding: 2px 8px;
  font-size: 10px;
}

/* --- Order Progress Bar --- */
.progress-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 0;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 36px;
  right: 36px;
  height: 2px;
  background-color: var(--gray-200);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.progress-step .circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  transition: var(--transition);
}

.progress-step .step-label {
  font-size: 10px;
  color: var(--gray-500);
  text-align: center;
  max-width: 60px;
  line-height: 1.3;
}

.progress-step.active .circle {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

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

.progress-step.completed .circle {
  background-color: var(--success);
  border-color: var(--success);
  color: var(--white);
}

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

.progress-line {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--gray-200);
  z-index: 0;
}

.progress-line .progress-line-fill {
  height: 100%;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

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

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab .tab-count {
  background-color: var(--gray-200);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-left: 6px;
}

.tab.active .tab-count {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* --- Quantity Control --- */
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-control .qty-btn {
  width: 36px;
  height: 36px;
  background-color: var(--gray-100);
  border: none;
  border-right: 1px solid var(--gray-200);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  color: var(--gray-600);
  transition: var(--transition);
  font-family: inherit;
}

.qty-control .qty-btn:hover {
  background-color: var(--gray-200);
}

.qty-control .qty-btn:last-child {
  border-right: none;
  border-left: 1px solid var(--gray-200);
}

.qty-control .qty-count {
  width: 40px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.qty-control.qty-control-sm .qty-btn {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.qty-control.qty-control-sm .qty-count {
  width: 32px;
  height: 28px;
  font-size: 13px;
}

/* --- Item Row --- */
.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

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

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

.item-row .item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.item-row .item-meta {
  font-size: 12px;
  color: var(--gray-500);
}

.item-row .item-price {
  font-size: 12px;
  color: var(--gray-500);
}

.item-row .item-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-left: 12px;
  white-space: nowrap;
}

.item-row .item-qty {
  margin-left: 12px;
}

/* --- Order Card --- */
.order-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--content-padding);
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
}

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

.order-card:active {
  transform: scale(0.99);
}

.order-card .order-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-card .order-id {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.order-card .order-date {
  font-size: 12px;
  color: var(--gray-500);
}

.order-card .order-items {
  font-size: 14px;
  color: var(--gray-700);
  margin: 8px 0;
  line-height: 1.4;
}

.order-card .order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.order-card .order-total {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.order-card .order-status {
  font-size: 11px;
}

/* --- Order Detail --- */
.order-detail {
  padding: var(--content-padding);
}

.order-detail .detail-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.order-detail .detail-header .detail-title {
  font-size: var(--h2-size);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.order-detail .detail-header .detail-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

.order-detail .detail-section {
  margin-bottom: 20px;
}

.order-detail .detail-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px;
}

.order-detail .detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}

.order-detail .detail-row:last-child {
  border-bottom: none;
}

.order-detail .detail-label {
  color: var(--gray-500);
  font-size: 13px;
}

.order-detail .detail-value {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
}

/* --- Agent Card --- */
.agent-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--content-padding);
  margin-bottom: 12px;
  transition: var(--transition);
}

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

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

.agent-card .agent-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.agent-card .agent-info {
  flex: 1;
}

.agent-card .agent-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.agent-card .agent-role {
  font-size: 12px;
  color: var(--gray-500);
}

.agent-card .agent-details {
  margin-bottom: 12px;
}

.agent-card .agent-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 0;
}

.agent-card .agent-detail-row .label {
  color: var(--gray-500);
}

.agent-card .agent-detail-row .value {
  font-weight: 500;
  color: var(--gray-700);
}

.agent-card .agent-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

/* --- Data Table --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table th {
  background-color: var(--gray-100);
  padding: 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-700);
}

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

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

.data-table .table-actions {
  display: flex;
  gap: 8px;
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  z-index: 200;
  padding: 0 var(--content-padding);
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
  pointer-events: auto;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

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

.toast .toast-close {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  font-size: 18px;
  opacity: 0.8;
  padding: 0;
  margin-left: auto;
}

.toast .toast-close:hover {
  opacity: 1;
}

/* --- Loading States --- */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.loading-text {
  color: var(--gray-500);
  font-size: 14px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 4px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

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

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

.empty-state .empty-text {
  font-size: 14px;
  color: var(--gray-400);
  max-width: 280px;
  margin-bottom: 20px;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.modal-body {
  color: var(--gray-600);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-actions .btn {
  min-width: 80px;
}

/* --- Date Picker --- */
.date-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--white);
  transition: var(--transition);
  appearance: none;
}

.date-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* --- Time Slot Selector --- */
.time-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.time-slot {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--white);
}

.time-slot:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.time-slot.selected {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.time-slot .time-slot-time {
  font-size: 14px;
  font-weight: 600;
}

.time-slot .time-slot-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.time-slot.selected .time-slot-label {
  color: rgba(255, 255, 255, 0.8);
}

.time-slot.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--gray-100);
  border-color: var(--gray-100);
}

.time-slot.disabled:hover {
  border-color: var(--gray-100);
  background-color: var(--gray-100);
}

/* --- Service Selector --- */
.service-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.service-tabs::-webkit-scrollbar {
  display: none;
}

.service-tab {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--white);
}

.service-tab:hover {
  border-color: var(--primary);
}

.service-tab.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.service-tab .service-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.service-tab .service-name {
  font-size: 13px;
  font-weight: 600;
}

.service-tab.active .service-name {
  color: var(--white);
}

/* --- Search Bar --- */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}

.search-bar .search-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--gray-50);
  transition: var(--transition);
}

.search-bar .search-input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-bar .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
  pointer-events: none;
}

/* --- Pull to Refresh --- */
.pull-refresh {
  text-align: center;
  padding: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background-color: var(--gray-200);
  margin: 16px 0;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-400);
  font-size: 12px;
  margin: 20px 0;
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--gray-200);
}

/* --- Avatar --- */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  background-color: var(--primary-light);
  color: var(--primary);
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

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

/* --- Notification Dot --- */
.notification-dot {
  position: relative;
}

.notification-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background-color: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

/* --- Switch Toggle --- */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.switch .switch-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--white);
  border-radius: 50%;
  transition: var(--transition);
}

.switch input:checked + .switch-slider {
  background-color: var(--primary);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* --- Chip / Tag --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background-color: var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
}

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

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

.chip .chip-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: inherit;
  opacity: 0.7;
  padding: 0;
  line-height: 1;
}

.chip .chip-remove:hover {
  opacity: 1;
}

/* --- Price Display --- */
.price {
  font-weight: 700;
  color: var(--gray-900);
}

.price-sm {
  font-size: 12px;
}

.price-lg {
  font-size: 20px;
}

.price-original {
  text-decoration: line-through;
  color: var(--gray-400);
  font-weight: 400;
}

.price-discount {
  color: var(--danger);
}

/* --- Rating Stars --- */
.rating {
  display: inline-flex;
  gap: 2px;
  color: var(--warning);
  font-size: 14px;
}

.rating .star {
  cursor: pointer;
}

.rating .star.empty {
  color: var(--gray-300);
}

/* --- Address Card --- */
.address-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.address-card:hover {
  border-color: var(--primary);
}

.address-card.selected {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.address-card .address-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.address-card .address-text {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.4;
}

.address-card .address-phone {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* --- Price Summary --- */
.price-summary {
  background-color: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.price-summary .price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

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

.price-summary .price-row .value {
  font-weight: 500;
  color: var(--gray-800);
}

.price-summary .price-row.total {
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
  padding-top: 12px;
}

.price-summary .price-row.total .label {
  font-weight: 600;
  color: var(--gray-900);
}

.price-summary .price-row.total .value {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
}

/* --- Responsive Design --- */
@media (min-width: 768px) {
  :root {
    --max-width: 600px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 18px;
  }

  .summary-grid {
    gap: 16px;
  }

  .summary-card {
    padding: 20px;
  }

  .summary-card .summary-value {
    font-size: 28px;
  }

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

  .data-table {
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  :root {
    --max-width: 800px;
  }

  .app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
  }

  .side-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background-color: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 20px 0;
    z-index: 90;
  }

  .bottom-nav {
    display: none;
  }

  .view {
    padding-left: 260px;
  }

  .top-bar {
    left: 0;
    transform: none;
    max-width: none;
    padding-left: 260px;
  }

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

/* --- Animations --- */
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

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

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* --- Utility Classes --- */

/* Display */
.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.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;
}

.flex-1 {
  flex: 1;
}

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

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

/* Gap */
.gap-4 {
  gap: 4px;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.gap-20 {
  gap: 20px;
}

.gap-24 {
  gap: 24px;
}

/* Margin */
.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-24 {
  margin-top: 24px;
}

.mb-4 {
  margin-bottom: 4px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-24 {
  margin-bottom: 24px;
}

.ml-auto {
  margin-left: auto;
}

.mr-auto {
  margin-right: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Padding */
.p-4 {
  padding: 4px;
}

.p-8 {
  padding: 8px;
}

.p-12 {
  padding: 12px;
}

.p-16 {
  padding: 16px;
}

.p-20 {
  padding: 20px;
}

.p-24 {
  padding: 24px;
}

.px-16 {
  padding-left: 16px;
  padding-right: 16px;
}

.py-8 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.py-12 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.py-16 {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Text */
.text-center {
  text-align: center;
}

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

.text-left {
  text-align: left;
}

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.text-gray {
  color: var(--gray-500);
}

.text-white {
  color: var(--white);
}

.text-sm {
  font-size: 12px;
}

.text-base {
  font-size: 14px;
}

.text-lg {
  font-size: 16px;
}

.text-xl {
  font-size: 20px;
}

/* Font */
.font-normal {
  font-weight: 400;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

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

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

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

.overflow-auto {
  overflow: auto;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Border */
.rounded-sm {
  border-radius: var(--radius-sm);
}

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

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

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

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

/* Shadow */
.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);
}

/* Position */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.sticky {
  position: sticky;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

/* Opacity */
.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

/* Animation Utilities */
.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 1s ease infinite;
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease;
}

.animate-slideIn {
  animation: slideIn 0.3s ease;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Print Styles --- */
@media print {
  .top-bar,
  .bottom-nav,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }

  .view {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--gray-200);
  }
}

/* --- Additional Component Styles --- */

.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.auth-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.btn-back {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--gray-600);
  border-radius: var(--radius-md);
}

.btn-back:hover {
  background: var(--gray-100);
}

.view-content {
  padding: var(--content-padding);
  padding-top: calc(var(--top-bar-height) + 16px);
  padding-bottom: calc(var(--bottom-nav-height) + 16px);
  max-width: var(--max-width);
  margin: 0 auto;
}

.price-note {
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 8px;
}

.price-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.user-greeting {
  font-size: 13px;
  color: var(--gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.table-container {
  overflow-x: auto;
  margin-top: 12px;
}

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

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

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

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-500);
  margin-top: 8px;
}

.greeting {
  font-size: 12px;
  color: var(--gray-500);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

/* ============================================
   MODERN UI ENHANCEMENT LAYER
   Clean & vibrant — gradients, glass, motion
   (loaded last so it refines base components)
   ============================================ */

/* Surfaces follow theme tokens */
.auth-card,
.card,
.summary-card,
.order-card,
.agent-card,
.table-container,
.bottom-nav,
.top-bar { background-color: var(--surface); }

.view-header { background: transparent; }

/* --- Top bar: glassy, sticky --- */
.top-bar {
  background-color: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}
.top-bar .logo-icon,
.auth-logo-icon { filter: drop-shadow(0 2px 4px rgba(79,70,229,0.25)); }
.top-bar .logo-text {
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.top-bar-right { display: flex; align-items: center; gap: 10px; }
.user-greeting { font-size: 13px; color: var(--gray-500); font-weight: 500; }

.lang-toggle, .theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: var(--transition);
}
.lang-toggle:hover, .theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.theme-toggle { padding: 7px 11px; font-size: 15px; line-height: 1; }

/* --- Bottom nav: floating glass pill --- */
.bottom-nav {
  background-color: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: calc(100% - 24px);
  max-width: calc(var(--max-width) - 24px);
  bottom: 12px;
  height: 60px;
  box-shadow: var(--shadow-lg);
}
.bottom-nav .nav-item { position: relative; transition: var(--transition); }
.bottom-nav .nav-item .nav-icon { transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1); }
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item.active .nav-icon { transform: translateY(-3px) scale(1.12); }
.bottom-nav .nav-item.active::before {
  content: '';
  position: absolute;
  top: 4px; left: 50%;
  width: 28px; height: 28px;
  transform: translateX(-50%);
  background: var(--primary-light);
  border-radius: var(--radius-full);
  z-index: -1;
}

/* --- Auth screens --- */
#view-login, #view-register { background: var(--gradient-auth-bg); background-attachment: fixed; }
.auth-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 68px; height: 68px;
  font-size: 34px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-primary);
  margin-bottom: 14px;
  animation: floaty 3.5s ease-in-out infinite;
}
.auth-logo h1 {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-subtitle { color: var(--gray-500); font-size: 14px; margin-top: 2px; }

/* --- Inputs --- */
.form-input, .form-select, .form-textarea {
  background-color: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  background-color: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* --- Buttons: gradient primary with depth --- */
.btn { border-radius: var(--radius-md); font-weight: 700; letter-spacing: 0.01em; }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--gradient-primary); filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79,70,229,0.42); }
.btn-success { background: var(--gradient-success); color: #fff; box-shadow: 0 8px 22px rgba(5,150,105,0.32); }
.btn-success:hover { filter: brightness(1.06); transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn-secondary { background: var(--surface-2); color: var(--gray-700); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--gray-200); }

/* --- Cards: lift + hairline border --- */
.card, .summary-card, .order-card, .agent-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.order-card { cursor: pointer; }
.order-card:hover, .card.clickable:hover, .agent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* --- Summary cards: gradient numerals + accent bar --- */
.summary-grid { gap: 12px; }
.summary-card { position: relative; overflow: hidden; padding: 18px 14px; }
.summary-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-primary);
  opacity: 0.9;
}
.summary-card .summary-value {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.summary-card .summary-label { color: var(--gray-500); font-weight: 500; }

/* --- Service & time selectors --- */
.service-tab, .time-slot {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: var(--transition);
}
.service-tab.active, .time-slot.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.service-tab:hover, .time-slot:hover { border-color: var(--primary); transform: translateY(-1px); }

/* --- Quantity controls --- */
.qty-btn {
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  transition: var(--transition);
}
.qty-btn:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.08); }
.item-row { border-bottom: 1px solid var(--border); }

/* --- Price summary banner --- */
.price-summary {
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.price-total, .price-summary .value { color: var(--primary); font-weight: 800; }

/* --- Badges: subtle gradient sheen --- */
.badge { letter-spacing: 0.02em; }
.badge-delivered { background: var(--gradient-success); }

/* --- Progress bar polish --- */
.progress-step .circle { box-shadow: var(--shadow-sm); }
.progress-step.active .circle {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-primary);
  transform: scale(1.12);
}
.progress-step.completed .circle {
  background: var(--success);
  border-color: transparent;
  color: #fff;
}

/* --- Tables --- */
.data-table { border-radius: var(--radius-lg); overflow: hidden; }
.data-table thead th { background: var(--surface-2); color: var(--gray-600); }
.data-table tbody tr { transition: background-color 0.15s ease; }
.data-table tbody tr:hover { background: var(--surface-2); }

/* --- Tabs --- */
.tab { transition: var(--transition); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* --- Toasts --- */
.toast {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  animation: slideDown 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

/* --- Loading overlay & spinner --- */
.loading-overlay { background: var(--overlay-bg); backdrop-filter: blur(3px); }
.spinner {
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* --- Views fade/slide in --- */
.view.active { animation: viewIn 0.32s ease; }

/* --- Keyframes --- */
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --- Registration role selector --- */
.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.role-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: var(--transition);
}
.role-tab:hover { border-color: var(--primary); transform: translateY(-1px); }
.role-tab.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.role-tab .role-icon { font-size: 24px; line-height: 1; }
.role-tab .role-name { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.role-tab.active .role-name { color: var(--primary); }
.role-tab .role-desc { font-size: 11px; color: var(--gray-500); line-height: 1.3; }

/* --- Consultant approval (admin) --- */
.badge-pending_agent {
  background: var(--warning-light);
  color: var(--warning);
}
.pending-banner {
  background: var(--warning-light);
  color: var(--warning);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.row-actions { display: flex; gap: 6px; }
.row-actions .btn { padding: 5px 12px; font-size: 12px; }

/* --- Dashboard refresh button --- */
.view-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.refresh-btn {
  flex-shrink: 0;
  gap: 6px;
}
.refresh-btn .refresh-icon { font-size: 15px; line-height: 1; }
.refresh-btn:active .refresh-icon { animation: spin 0.5s linear; }
