/* assets/css/root.css - Design System Tokens & Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Unified Minimalist Resort Palette (#F8A41D Primary + Sleek Neutral Charcoals) */
  --primary: #F8A41D;
  --primary-hover: #E2900F;
  --primary-active: #C97E05;
  --primary-light: #FEF7EB;
  --primary-dark: #A86503;
  --primary-contrast: #18181B;
  
  --secondary: #18181B;
  --secondary-hover: #27272A;
  --secondary-light: #F4F4F5;
  
  /* Accent unified with primary brand to eliminate color variants */
  --accent: #F8A41D;
  --accent-hover: #E2900F;
  --accent-light: #FEF7EB;
  --accent-dark: #A86503;

  /* Aliased for legacy classes so no extra/disconnected colors appear */
  --accent-teal: #F8A41D;
  --accent-mint: #F8A41D;
  --accent-coral: #F8A41D;
  --accent-coral-hover: #E2900F;
  --accent-coral-light: #FEF7EB;

  /* Minimal functional status alerts only */
  --status-success: #15803D;
  --status-success-bg: #F0FDF4;
  --status-pending: #A86503;
  --status-pending-bg: #FEF7EB;
  --status-danger: #B91C1C;
  --status-danger-bg: #FEF2F2;

  /* Light Theme Variables */
  --bg-body: #F9FAFB;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-input: #FFFFFF;
  --bg-subtle: #F3F4F6;
  --text-main: #18181B;
  --text-muted: #71717A;
  --text-light: #A1A1AA;
  --border-color: #E4E4E7;
  --border-subtle: #F4F4F5;
  --shadow-sm: 0 1px 3px rgba(24, 24, 27, 0.05);
  --shadow-md: 0 4px 14px rgba(24, 24, 27, 0.07);
  --shadow-lg: 0 10px 28px rgba(24, 24, 27, 0.1);
  --navbar-bg: rgba(255, 255, 255, 0.96);
  --bottom-bar-bg: rgba(255, 255, 255, 0.98);

  /* Radius & Transitions */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --bg-body: #0C0D0E;
  --bg-surface: #141517;
  --bg-surface-elevated: #1B1C1F;
  --bg-input: #101113;
  --bg-subtle: #222327;
  --text-main: #F4F4F5;
  --text-muted: #A1A1AA;
  --text-light: #71717A;
  --border-color: #27272A;
  --border-subtle: #1F1F23;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.7);
  --navbar-bg: rgba(20, 21, 23, 0.96);
  --bottom-bar-bg: rgba(20, 21, 23, 0.98);
  --primary-light: #281D0B;
  --secondary-light: #222327;
  --accent-light: #281D0B;
  --accent-coral-light: #281D0B;
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: 'Outfit', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15.5px;
  scroll-behavior: smooth;
}

/* Responsive Font Scaling for Smaller Screen Phones */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}
@media (max-width: 360px) {
  html {
    font-size: 13.5px;
  }
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, color 0.25s ease;
  padding-bottom: 56px; /* Slim space for mobile bottom app bar */
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

/* App Container - Tightened for small phones */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

@media (max-width: 640px) {
  .container {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
}
@media (max-width: 380px) {
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Header & Top Bar */
.topbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8rem;
  padding: 0.35rem 0;
  color: var(--text-muted);
}
.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-right {
  gap: 0.75rem;
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.topbar-item:hover {
  color: var(--primary);
}
.topbar-badge {
  font-size: 0.75rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.topbar-wa {
  font-weight: 600;
  color: var(--primary);
}
.topbar-wa:hover {
  color: var(--primary-hover);
}

@media (max-width: 640px) {
  .topbar {
    font-size: 0.75rem;
    padding: 0.25rem 0;
  }
  /* Remove text and keep icon only on mobile view */
  .topbar-text {
    display: none !important;
  }
  .topbar-left,
  .topbar-right {
    gap: 0.45rem;
  }
  .topbar-item,
  .topbar-badge {
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    justify-content: center;
  }
  .topbar-item:hover,
  .topbar-item:active {
    background: var(--bg-subtle);
  }
  .topbar-item .svg-icon,
  .topbar-badge .svg-icon {
    font-size: 1.05rem;
    width: 1.05em;
    height: 1.05em;
  }
}

.site-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
@media (max-width: 640px) {
  .navbar-container {
    height: 54px;
  }
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}
.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}
@media (max-width: 640px) {
  .brand-logo-img {
    height: 32px;
  }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}
@media (min-width: 992px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.4rem 0.2rem;
  font-size: 0.92rem;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Buttons - Unified Premium Styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}
@media (max-width: 480px) {
  .btn {
    padding: 0.42rem 0.85rem;
    font-size: 0.85rem;
  }
}
.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}
.btn-lg {
  padding: 0.68rem 1.4rem;
  font-size: 0.98rem;
  border-radius: var(--radius-md);
}
@media (max-width: 480px) {
  .btn-lg {
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
  }
}

/* Primary Button (#F8A41D) */
.btn-primary, .btn-coral {
  background: var(--primary);
  color: #18181B;
  border-color: var(--primary);
  font-weight: 700;
}
.btn-primary:hover, .btn-coral:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #18181B;
  box-shadow: 0 4px 14px rgba(248, 164, 29, 0.35);
}

/* Secondary Button (Neutral Charcoal) */
.btn-secondary, .btn-accent {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}
.btn-secondary:hover, .btn-accent:hover {
  background: var(--primary);
  color: #18181B;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(248, 164, 29, 0.25);
}

/* Outline Button */
.btn-outline {
  border-color: var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-light);
}
[data-theme="dark"] .btn-outline:hover {
  color: var(--primary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.9rem;
}
.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* SVG Icon System */
.svg-icon {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.15em;
  fill: currentColor;
  flex-shrink: 0;
  line-height: 1;
}
.svg-icon-sm {
  width: 0.9em;
  height: 0.9em;
  vertical-align: -0.12em;
}
.svg-icon-lg {
  width: 1.35em;
  height: 1.35em;
}
.svg-icon-xl {
  width: 1.85em;
  height: 1.85em;
}

/* Badges - Subtle, Refined & Unified */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  line-height: 1.2;
}
.badge-primary, .badge-coral, .badge-accent {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: rgba(248, 164, 29, 0.3);
}
.badge-secondary {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border-color);
}
.badge-success, .badge-confirmed, .badge-paid {
  background: var(--status-success-bg);
  color: var(--status-success);
  border-color: rgba(21, 128, 61, 0.25);
}
.badge-warning, .badge-pending, .badge-partial {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: rgba(248, 164, 29, 0.3);
}
.badge-danger, .badge-cancelled, .badge-unpaid {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border-color: rgba(185, 28, 28, 0.25);
}
.badge-info, .badge-checked-in {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: rgba(248, 164, 29, 0.3);
}
.badge-checked-out, .badge-refunded {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border-color);
}

[data-theme="dark"] .badge-primary,
[data-theme="dark"] .badge-coral,
[data-theme="dark"] .badge-accent,
[data-theme="dark"] .badge-warning,
[data-theme="dark"] .badge-pending,
[data-theme="dark"] .badge-partial,
[data-theme="dark"] .badge-info,
[data-theme="dark"] .badge-checked-in {
  background: rgba(248, 164, 29, 0.18);
  color: #F8A41D;
  border-color: rgba(248, 164, 29, 0.35);
}
[data-theme="dark"] .badge-success, [data-theme="dark"] .badge-confirmed, [data-theme="dark"] .badge-paid {
  background: rgba(21, 128, 61, 0.2);
  color: #4ADE80;
  border-color: rgba(21, 128, 61, 0.35);
}
[data-theme="dark"] .badge-danger, [data-theme="dark"] .badge-cancelled, [data-theme="dark"] .badge-unpaid {
  background: rgba(185, 28, 28, 0.2);
  color: #F87171;
  border-color: rgba(185, 28, 28, 0.35);
}


/* Cards - Subtle Elevated & Compact */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(248, 164, 29, 0.35);
}

@media (max-width: 640px) {
  .card {
    border-radius: var(--radius-sm);
  }
}

/* Mobile Bottom Navigation Bar (Slim, Native App Style) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--bottom-bar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 52px;
  padding: 0 0.25rem;
}
@media (min-width: 992px) {
  .mobile-bottom-nav {
    display: none;
  }
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  position: relative;
  gap: 2px;
}
.mobile-nav-item i,
.mobile-nav-item .svg-icon {
  font-size: 1.15rem;
}
.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--primary);
  font-weight: 700;
}
.mobile-nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 14px);
  background: var(--primary);
  color: #18181B;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.1rem 0.3rem;
  border-radius: 9999px;
  line-height: 1;
}

/* Mobile Drawer / Offcanvas */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 14, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 275px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-surface);
  z-index: 1110;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
  padding: 1.25rem;
  overflow-y: auto;
}
.mobile-drawer.active {
  transform: translateX(-300px);
}

/* Form Elements - Compact & Clean */
.form-group {
  margin-bottom: 0.9rem;
}
@media (max-width: 480px) {
  .form-group {
    margin-bottom: 0.75rem;
  }
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}
@media (max-width: 480px) {
  .form-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
  }
}
.form-control {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
  font-size: 0.92rem;
}
@media (max-width: 480px) {
  .form-control {
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    height: 38px;
  }
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2.5px rgba(248, 164, 29, 0.22);
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Alert Boxes */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid transparent;
  font-size: 0.88rem;
}
.alert-success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border-color: rgba(21, 128, 61, 0.2);
}
.alert-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border-color: rgba(185, 28, 28, 0.2);
}
.alert-warning {
  background: var(--status-pending-bg);
  color: var(--status-pending);
  border-color: rgba(168, 101, 3, 0.25);
}
.alert-info {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: rgba(248, 164, 29, 0.25);
}
