/* ===================================================
   H2O AQUATOWER - MODERN RESPONSIVE DESIGN SYSTEM
   Mobile-First & Fluid Layout (360px to 4K Displays)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  /* Color Palette */
  --bg-deep: #060b18;
  --bg-surface: #0b1328;
  --bg-surface-elevated: #111c38;
  --bg-glass: rgba(17, 28, 56, 0.75);
  --bg-glass-subtle: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 210, 255, 0.6);
  --border-active: rgba(56, 189, 248, 0.4);

  --cyan-primary: #00d2ff;
  --blue-primary: #0066fe;
  --gradient-brand: linear-gradient(135deg, #00d2ff 0%, #0066fe 100%);
  --gradient-brand-subtle: linear-gradient(135deg, rgba(0, 210, 255, 0.12) 0%, rgba(0, 102, 254, 0.12) 100%);
  
  --emerald-success: #10b981;
  --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --amber-warning: #f59e0b;
  --rose-danger: #f43f5e;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --glow-cyan: 0 0 24px rgba(0, 210, 255, 0.3);
  --glow-success: 0 0 24px rgba(16, 185, 129, 0.35);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(ellipse at 15% 10%, rgba(0, 210, 255, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 85%, rgba(0, 102, 254, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 11, 24, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (min-width: 768px) {
  .app-header {
    padding: 14px 28px;
  }
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--glow-cyan);
  flex-shrink: 0;
}

.brand-info h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, #ffffff, #a5f3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.brand-info p {
  font-size: clamp(0.68rem, 1.8vw, 0.75rem);
  color: var(--cyan-primary);
  font-weight: 600;
  letter-spacing: 0.3px;
}

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

.realtime-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.realtime-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-success);
  box-shadow: 0 0 8px var(--emerald-success);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

.sound-btn {
  background: var(--bg-glass-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.sound-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cyan-primary);
}

/* Admin Nav Tabs */
.admin-nav-wrapper {
  background: rgba(11, 19, 40, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 12px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-nav-wrapper::-webkit-scrollbar {
  display: none;
}

.admin-nav-tabs {
  display: flex;
  gap: 6px;
  max-width: 1100px;
  width: 100%;
}

.admin-nav-tab {
  flex: 1;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.admin-nav-tab.active {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: var(--glow-cyan);
}

.tab-badge {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}

/* Layout Containers */
.main-wrapper {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 14px 60px 14px;
}

@media (min-width: 768px) {
  .main-wrapper {
    padding: 24px 20px 60px 20px;
  }
}

.tab-content {
  display: none;
  animation: tabFadeIn 0.25s ease-out;
}
.tab-content.active {
  display: block;
}

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

/* Glass Card */
.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 3vw, 22px);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 8px;
}

.panel-header h2, .panel-header h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--cyan-primary);
  background: rgba(0, 210, 255, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Resident Layout Grid */
.resident-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

@media (min-width: 900px) {
  .resident-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

/* Room Selection System */
.form-section {
  margin-bottom: 20px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.section-label span.hint {
  font-size: 0.74rem;
  color: var(--cyan-primary);
  font-weight: 600;
}

/* Floor Scroller */
.floor-pills-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.floor-pill-btn, .floor-pill {
  flex: 0 0 auto;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}

.floor-pill-btn:hover, .floor-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.floor-pill-btn.active, .floor-pill.active {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.35);
}

/* Rooms Grid */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(6, 11, 24, 0.6);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.room-card-btn, .room-btn {
  padding: 8px 4px;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.room-card-btn span.sub, .room-card-btn span.tag,
.room-btn span.sub, .room-btn span.tag {
  font-size: 0.62rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.room-card-btn:hover, .room-btn:hover {
  border-color: var(--cyan-primary);
  background: rgba(0, 210, 255, 0.1);
  transform: translateY(-1px);
}

.room-card-btn.selected, .room-btn.selected {
  background: var(--gradient-brand);
  color: #ffffff;
  border-color: var(--cyan-primary);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.45);
}

.room-card-btn.selected span.sub, .room-card-btn.selected span.tag,
.room-btn.selected span.sub, .room-btn.selected span.tag {
  color: #e0f2fe;
}

.room-search-box {
  margin-top: 8px;
}

.app-input {
  width: 100%;
  background: rgba(6, 11, 24, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  min-height: 42px;
}

.app-input:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
}

/* Inputs row */
.form-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 500px) {
  .form-2col {
    grid-template-columns: 1fr 1fr;
  }
}

.input-field {
  margin-bottom: 14px;
}

.input-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.input-field label span.req {
  color: var(--rose-danger);
}

/* Product Card */
.product-brief-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.product-info h4 {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
}

.product-price-label {
  color: var(--cyan-primary);
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-heading);
  margin-top: 2px;
}

/* Quantity Controls */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stepper-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.stepper-btn:hover {
  background: var(--cyan-primary);
  color: #042449;
  border-color: transparent;
}

.stepper-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  min-width: 40px;
  text-align: center;
}

.qty-preset-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.preset-chip {
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover, .preset-chip.active {
  background: rgba(0, 210, 255, 0.18);
  border-color: var(--cyan-primary);
  color: #ffffff;
}

/* Payment Selector Cards */
.payment-selector-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

@media (min-width: 480px) {
  .payment-selector-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.payment-method-card {
  padding: 10px 12px;
  background: rgba(6, 11, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  min-height: 48px;
}

.payment-method-card:hover {
  border-color: rgba(0, 210, 255, 0.4);
}

.payment-method-card.active {
  border-color: var(--cyan-primary);
  background: rgba(0, 210, 255, 0.1);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.15);
}

.payment-method-card strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.payment-method-card small {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Order Summary Box */
.summary-box {
  background: rgba(6, 11, 24, 0.8);
  border: 1px dashed var(--border-active);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.summary-row.total-row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.summary-row.total-row span.total-price {
  color: var(--cyan-primary);
}

/* Primary Button */
.btn-cta {
  width: 100%;
  padding: 14px;
  background: var(--gradient-brand);
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--glow-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.6);
}

.btn-cta:active {
  transform: translateY(1px);
}

/* Order Tracker */
.tracker-panel {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(0, 210, 255, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.order-tag {
  background: #0284c7;
  color: #fff;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
}

.status-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 20px 0 16px 0;
}

.status-steps::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.step-node, .step-item {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px auto;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-tertiary);
  transition: all 0.25s;
}

.step-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.step-node.active .step-circle, .step-item.active .step-circle {
  background: var(--cyan-primary);
  border-color: #fff;
  color: #042449;
  box-shadow: 0 0 12px var(--cyan-primary);
}

.step-node.active .step-title, .step-item.active .step-title {
  color: var(--cyan-primary);
  font-weight: 700;
}

.step-node.completed .step-circle, .step-item.completed .step-circle {
  background: var(--emerald-success);
  border-color: #fff;
  color: #fff;
}

.step-node.completed .step-title, .step-item.completed .step-title {
  color: var(--emerald-success);
}

/* PayOS Card */
.payos-box {
  background: rgba(6, 11, 24, 0.85);
  border: 1px solid var(--cyan-primary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 12px;
  text-align: center;
}

.payos-qr {
  width: min(190px, 60vw);
  height: min(190px, 60vw);
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 6px;
  margin: 10px auto;
  display: block;
}

.bank-details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.bank-details-grid .lbl {
  color: var(--text-secondary);
  font-weight: 500;
}

.bank-details-grid .val {
  color: var(--text-primary);
  text-align: right;
  word-break: break-all;
  font-weight: 600;
}

/* Badges */
.badge-payment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-payment.paid {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-payment.unpaid {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-payment.cash {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* ===================================================
   ADMIN & SHIPPER PORTAL STYLES
   =================================================== */

/* 4 Shipper Switcher Row */
.shipper-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.shipper-btn-card {
  background: var(--bg-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  min-height: 52px;
}

.shipper-btn-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.shipper-btn-card.active {
  background: rgba(0, 102, 254, 0.15);
  border-color: var(--cyan-primary);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
}

.shipper-btn-card .avatar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #1e293b;
  flex-shrink: 0;
}

.shipper-btn-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.shipper-btn-card span.code {
  font-size: 0.65rem;
  color: var(--cyan-primary);
  font-weight: 800;
}

/* Shipper HUD */
.shipper-hud-banner {
  background: linear-gradient(135deg, rgba(15, 26, 56, 0.95), rgba(7, 13, 30, 0.95));
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hud-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--bg-surface);
  border: 2px solid var(--cyan-primary);
}

.hud-profile h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
}

.hud-profile p {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.hud-stats-tiles {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-tile {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  text-align: center;
  min-width: 100px;
}

.hud-tile span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 700;
  text-transform: uppercase;
}

.hud-tile strong {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.hud-tile.highlight strong {
  color: #34d399;
}

/* Shipper Subnav */
.shipper-filter-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  overflow-x: auto;
}

.filter-tab-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.filter-tab-btn.active {
  background: rgba(0, 210, 255, 0.14);
  border-color: var(--cyan-primary);
  color: #fff;
}

.filter-tab-btn span.badge-num {
  background: var(--cyan-primary);
  color: #042449;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 800;
}

/* Shipper Orders Cards */
.orders-grid-flow {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.delivery-order-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.delivery-order-item.urgent {
  border-left: 4px solid var(--amber-warning);
}

.delivery-order-item.active-transit {
  border-left: 4px solid var(--cyan-primary);
  background: rgba(14, 165, 233, 0.08);
}

.card-room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.giant-room-label {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.giant-room-label span.floor-pill {
  font-size: 0.72rem;
  color: var(--cyan-primary);
  background: rgba(0, 210, 255, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

.btn-action-claim {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-claim:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.btn-action-deliver {
  width: 100%;
  padding: 12px;
  background: var(--gradient-success);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--glow-success);
  transition: all 0.2s ease;
}

.btn-action-deliver:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
}

/* Leaderboard Podium */
.leaderboard-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.podium-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  transition: all 0.2s ease;
}

.podium-tile.rank-1 {
  border-color: #fbbf24;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.2);
}

.podium-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  margin: 0 auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--bg-surface-elevated);
}

.podium-tile.rank-1 .podium-avatar-wrap {
  border: 2px solid #fbbf24;
}

/* 15 Floors Building Heatmap Responsive Table */
.building-scroll-matrix {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.matrix-flow-wrapper {
  min-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.matrix-floor-strip {
  background: rgba(6, 11, 24, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.strip-floor-title {
  flex: 0 0 65px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--cyan-primary);
}

.strip-rooms-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(19, 1fr);
  gap: 3px;
}

.cell-room-box {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-tertiary);
  transition: all 0.15s ease;
}

.cell-room-box.status-pending {
  background: var(--amber-warning);
  color: #000;
  box-shadow: 0 0 6px var(--amber-warning);
}

.cell-room-box.status-delivering {
  background: #0284c7;
  color: #fff;
}

.cell-room-box.status-completed {
  background: var(--emerald-success);
  color: #fff;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 380px;
  margin-left: auto;
  background: rgba(11, 19, 40, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--cyan-primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transform: translateY(150%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  transform: translateY(0);
}

/* Confetti */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===================================================
   RESPONSIVE DESIGN BREAKPOINTS & FLUID TWEAKS
   =================================================== */

/* Tablet & Large Mobile (<= 768px) */
@media (max-width: 768px) {
  .app-header {
    padding: 10px 14px;
  }
  .hud-stats-tiles {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .hud-tile {
    min-width: unset;
    padding: 6px 8px;
  }
  .hud-tile strong {
    font-size: 1.05rem;
  }
}

/* Small Smartphone (<= 480px) */
@media (max-width: 480px) {
  .app-header {
    padding: 8px 12px;
  }
  .brand-logo {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
  .brand-info h1 {
    font-size: 1.05rem;
  }
  .brand-info p {
    font-size: 0.65rem;
  }
  .sound-btn span {
    font-size: 0.72rem;
  }
  .realtime-badge {
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .admin-nav-tab {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .glass-panel {
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
  }
  .rooms-grid {
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 5px;
    max-height: 180px;
  }
  .room-card-btn, .room-btn {
    padding: 6px 2px;
    font-size: 0.8rem;
    min-height: 40px;
  }
  .product-brief-card {
    padding: 10px;
  }
  .product-thumb {
    width: 44px;
    height: 44px;
  }
  .product-info h4 {
    font-size: 0.9rem;
  }
  .product-price-label {
    font-size: 1rem;
  }
  .stepper-btn {
    width: 34px;
    height: 34px;
  }
  .stepper-value {
    font-size: 1.15rem;
    min-width: 34px;
  }
  .btn-cta {
    padding: 12px;
    font-size: 0.92rem;
    min-height: 44px;
  }
  .shipper-grid-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .shipper-btn-card {
    padding: 8px;
    min-height: 48px;
    gap: 8px;
  }
  .shipper-btn-card .avatar-icon {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
  .shipper-btn-card h4 {
    font-size: 0.8rem;
  }
  .hud-avatar {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
  .hud-profile h3 {
    font-size: 1.05rem;
  }
  .toast-notification {
    left: 10px;
    right: 10px;
    bottom: 12px;
    padding: 10px 14px;
  }
}

/* Extra Small Devices (<= 360px) */
@media (max-width: 360px) {
  .rooms-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .shipper-grid-row {
    grid-template-columns: 1fr;
  }
  .hud-stats-tiles {
    grid-template-columns: 1fr;
  }
}

/* Large Screens (>= 1400px) */
@media (min-width: 1400px) {
  .main-wrapper {
    max-width: 1320px;
  }
  .glass-panel {
    padding: 26px;
  }
}
