/* ==========================================================================
   AURORA HOSPITALITY DESIGN SYSTEM
   Luxury Nordic Hospitality & Mobile Housekeeping Suite (v2.0.3)
   ========================================================================== */

:root {
  --bg-base: #0a0f1d;
  --bg-card: rgba(18, 25, 44, 0.88);
  --bg-card-hover: rgba(28, 38, 64, 0.95);
  --bg-card-solid: #12192c;
  --bg-elevated: rgba(30, 41, 69, 0.92);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);
  --border-glow: rgba(56, 189, 248, 0.45);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.3);
  
  --status-ready: #10b981;
  --status-ready-bg: rgba(16, 185, 129, 0.16);
  --status-ready-border: rgba(16, 185, 129, 0.4);
  
  --status-turnover: #f59e0b;
  --status-turnover-bg: rgba(245, 158, 11, 0.18);
  --status-turnover-border: rgba(245, 158, 11, 0.5);
  
  --status-clean: #ef4444;
  --status-clean-bg: rgba(239, 68, 68, 0.16);
  --status-clean-border: rgba(239, 68, 68, 0.45);
  
  --status-incoming: #0ea5e9;
  --status-incoming-bg: rgba(14, 165, 233, 0.16);
  --status-incoming-border: rgba(14, 165, 233, 0.4);
  
  --status-inhouse: #8b5cf6;
  --status-inhouse-bg: rgba(139, 92, 246, 0.16);
  --status-inhouse-border: rgba(139, 92, 246, 0.4);
  
  --status-empty: #64748b;
  --status-empty-bg: rgba(100, 116, 139, 0.16);
  
  --channel-airbnb: #ff385c;
  --channel-booking: #003580;
  --channel-direct: #10b981;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--border-subtle);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 1px 1px var(--border-active);
  
  --font-display: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Nordic Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: 10%;
  background: radial-gradient(circle, #1d4ed8, transparent 70%);
}
.glow-2 {
  width: 600px;
  height: 600px;
  top: 30%;
  right: -100px;
  background: radial-gradient(circle, #0f766e, transparent 70%);
}

/* Layout */
.app-layout {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 18px 48px;
}

/* Header */
.app-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.header-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}
.brand-logo.justify-center {
  justify-content: center;
}
.logo-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 1.2px;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.brand-sub {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Property Filter Switcher */
.property-filter {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.property-filter::-webkit-scrollbar {
  display: none;
}

.prop-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.prop-btn:hover {
  color: var(--text-primary);
}
.prop-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Meta Pill */
.meta-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  background-color: var(--status-ready);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--status-ready);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(45deg);
}

/* User Menu */
.user-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  max-width: 140px;
}
.user-avatar {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-name {
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-role-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  flex-shrink: 0;
}
.btn-logout {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-logout:hover {
  color: var(--status-clean);
  border-color: var(--status-clean-border);
}

/* Main Navigation Tabs (Sticky Frosted Header on Mobile) */
.main-nav {
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 0;
}
.nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}
.nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nav-tab:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-active);
}
.nav-tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.16));
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}
.tab-badge {
  background: var(--status-turnover);
  color: #000;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* Stats Overview Bar */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.stat-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.icon-blue { background: rgba(56, 189, 248, 0.12); }
.icon-amber { background: rgba(245, 158, 11, 0.12); }
.icon-green { background: rgba(16, 185, 129, 0.12); }
.icon-purple { background: rgba(139, 92, 246, 0.12); }

.stat-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

/* View Panels */
.view-panel {
  display: none;
  animation: fadeIn 0.2s ease-out;
}
.view-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.panel-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}
.panel-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}
.date-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   CABIN CARDS GRID (Housekeeping Mode)
   ========================================================================== */
.cabin-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.cabin-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.cabin-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-active);
  box-shadow: 0 14px 35px -10px rgba(0, 0, 0, 0.6);
}

.cabin-card.is-turnover {
  border-color: var(--status-turnover-border);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}
.cabin-card.is-clean-needed {
  border-color: var(--status-clean-border);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.cabin-badge-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cabin-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.cabin-property-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.status-pill.ready {
  background: var(--status-ready-bg);
  color: var(--status-ready);
  border: 1px solid var(--status-ready-border);
}
.status-pill.turnover {
  background: var(--status-turnover-bg);
  color: var(--status-turnover);
  border: 1px solid var(--status-turnover-border);
  animation: gentlePulse 2.5s infinite;
}
.status-pill.needs_cleaning {
  background: var(--status-clean-bg);
  color: var(--status-clean);
  border: 1px solid var(--status-clean-border);
}
.status-pill.incoming {
  background: var(--status-incoming-bg);
  color: var(--status-incoming);
  border: 1px solid var(--status-incoming-border);
}
.status-pill.inhouse {
  background: var(--status-inhouse-bg);
  color: var(--status-inhouse);
  border: 1px solid var(--status-inhouse-border);
}
.status-pill.empty {
  background: var(--status-empty-bg);
  color: var(--status-empty);
  border: 1px solid var(--border-subtle);
}

.card-guest-info {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.guest-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.channel-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.channel-pill.airbnb { background: rgba(255, 56, 92, 0.2); color: #ff385c; }
.channel-pill.booking { background: rgba(0, 53, 128, 0.35); color: #60a5fa; }
.channel-pill.direct { background: rgba(16, 185, 129, 0.2); color: #10b981; }

.guest-meta {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.card-remarks {
  font-size: 11.5px;
  color: var(--primary);
  margin-top: 3px;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-bottom-actions {
  display: flex;
  gap: 8px;
}
.btn-toggle-clean {
  flex: 1;
  min-height: 44px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  touch-action: manipulation;
}
.btn-toggle-clean.mark-ready {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.btn-toggle-clean.mark-ready:hover {
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}
.btn-toggle-clean.mark-clean-needed {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}
.btn-toggle-clean.mark-clean-needed:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: var(--status-clean-border);
}

.btn-card-note {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  touch-action: manipulation;
}
.btn-card-note:hover {
  background: rgba(255, 255, 255, 0.15);
}
.note-active-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  box-shadow: 0 0 8px #f59e0b;
}

/* ==========================================================================
   OPERATIONS TABLES & DATA
   ========================================================================== */
.ops-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.ops-subtabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.ops-subtab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ops-subtab.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.search-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12.5px;
  min-width: 180px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: var(--primary);
}

.table-container {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 600px;
}
.data-table th {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}
.empty-state {
  text-align: center;
  padding: 36px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================================================
   TIMELINE CALENDAR
   ========================================================================== */
.cal-nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cal-current-month {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  min-width: 120px;
  text-align: center;
}

.calendar-legend {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.legend-dot.airbnb { background: var(--channel-airbnb); }
.legend-dot.booking { background: #3b82f6; }
.legend-dot.direct { background: var(--channel-direct); }
.legend-dot.note { background: #f59e0b; border-radius: 50%; }

.calendar-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}
.cal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
.cal-table th, .cal-table td {
  border: 1px solid var(--border-subtle);
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
}
.cal-table th.cal-cabin-col {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg-card-solid);
  width: 90px;
  font-weight: 700;
  color: #fff;
}
.cal-table td.cal-cabin-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--bg-card-solid);
  font-weight: 700;
  color: var(--text-primary);
  text-align: left;
  padding-left: 12px;
}
.cal-day-head {
  font-weight: 600;
  color: var(--text-secondary);
}
.cal-day-head.is-today {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
}

.cal-booking-block {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.15s;
}
.cal-booking-block:hover {
  transform: scale(1.02);
  filter: brightness(1.15);
}
.cal-booking-block.airbnb { background: linear-gradient(135deg, #ff385c, #e00b41); }
.cal-booking-block.booking { background: linear-gradient(135deg, #1e40af, #2563eb); }
.cal-booking-block.direct { background: linear-gradient(135deg, #059669, #10b981); }

/* ==========================================================================
   CHARTS & FINANCIALS
   ========================================================================== */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}
.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.chart-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.chart-box {
  height: 260px;
  position: relative;
}
.chart-box-large {
  height: 320px;
  position: relative;
}

.fx-banner {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-glow);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12.5px;
  margin-bottom: 12px;
}

.report-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.month-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12.5px;
}

/* ==========================================================================
   BUTTONS & COMMON UI
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  touch-action: manipulation;
}
.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--text-primary);
  color: #fff;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
}
.btn-block {
  width: 100%;
}

/* ==========================================================================
   MODALS & DRAWERS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
  animation: fadeIn 0.2s ease-out;
}
.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.login-card {
  max-width: 380px;
  padding: 24px 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}
.modal-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Notes Timeline */
.notes-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}
.note-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}
.note-meta {
  font-size: 10.5px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 3px;
}
.note-text {
  font-size: 12.5px;
  color: var(--text-primary);
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
}
.preset-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border-color: var(--border-glow);
}

.note-input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-input-row textarea {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  resize: vertical;
  outline: none;
}
.note-input-row textarea:focus {
  border-color: var(--primary);
}

/* Login Form */
.login-header {
  text-align: center;
  margin-bottom: 20px;
}
.login-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 5px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.form-group input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
}
.form-group input:focus {
  border-color: var(--primary);
}
.login-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid var(--status-clean-border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.quick-login-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
.quick-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}

/* Toast Container (Top Toast on Mobile) */
.toast-container {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  left: 16px;
  max-width: 380px;
  margin: 0 auto;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-active);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  font-size: 12.5px;
  color: #fff;
  animation: slideDown 0.25s ease-out;
  pointer-events: auto;
}
.toast.success { border-left: 4px solid var(--status-ready); }
.toast.error { border-left: 4px solid var(--status-clean); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes gentlePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); } 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); } }

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE TUNING
   ========================================================================== */
@media (max-width: 768px) {
  .app-layout {
    padding: max(8px, env(safe-area-inset-top)) 10px max(24px, env(safe-area-inset-bottom));
  }
  .app-header {
    padding: 10px 12px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .header-top-row {
    gap: 6px;
  }
  .header-bottom-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .property-filter {
    width: 100%;
    justify-content: space-between;
  }
  .prop-btn {
    padding: 5px 6px;
    font-size: 10.5px;
    flex: 1;
    text-align: center;
  }
  .meta-pill {
    justify-content: center;
    width: 100%;
    font-size: 10.5px;
    padding: 4px 8px;
  }
  .main-nav {
    margin-left: -10px;
    margin-right: -10px;
    padding: 6px 10px;
  }
  .cabin-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }
  .stat-card {
    padding: 10px 12px;
    gap: 8px;
  }
  .stat-value {
    font-size: 15px;
  }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-card {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh;
  }
}
