/* ==========================================================================
   biXci - Mi biXci Mobile Dashboard Design System & CSS3 Stylesheet
   ========================================================================== */

:root {
  --bixci-yellow: #FFDB00;
  --bixci-yellow-dark: #FFCC00;
  --bixci-blue: #0046B8;
  --bixci-blue-dark: #003690;
  --bixci-blue-light: #EBF2FF;
  --bixci-bg: #F8F9FA;
  --bixci-card-bg: #FFFFFF;
  --bixci-text: #1A1A1A;
  --bixci-text-muted: #6B7280;
  --bixci-border: #E5E7EB;
  --bixci-success: #10B981;
  --bixci-warning: #F59E0B;
  --bixci-danger: #EF4444;
  --bixci-radius: 16px;
  --bixci-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --bixci-shadow-lg: 0 10px 30px rgba(0, 70, 184, 0.15);
  --bixci-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bixci-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* App Reset & Scope */
.bixci-app-wrap {
  font-family: var(--bixci-font-body);
  background-color: var(--bixci-bg);
  color: var(--bixci-text);
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 100px 16px;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.bixci-app-wrap * {
  box-sizing: border-box;
}

/* GUEST AUTHENTICATION CARD */
.bixci-auth-card {
  background: var(--bixci-card-bg);
  border-radius: var(--bixci-radius);
  padding: 24px 20px;
  box-shadow: var(--bixci-shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.bixci-auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.bixci-auth-title {
  font-family: var(--bixci-font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--bixci-blue);
  margin: 4px 0;
}

.bixci-auth-desc {
  font-size: 13px;
  color: var(--bixci-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Google Login Button */
.bixci-google-wrapper {
  margin-bottom: 16px;
}

.bixci-btn-google-login {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--bixci-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--bixci-font-body);
  font-size: 14px;
  font-weight: 600;
  color: #3C4043;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

.bixci-btn-google-login:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.bixci-btn-google-login:active {
  transform: scale(0.99);
}

/* Divider */
.bixci-auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: var(--bixci-text-muted);
  font-size: 12px;
}

.bixci-auth-divider::before,
.bixci-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--bixci-border);
}

.bixci-auth-divider span {
  padding: 0 10px;
}

/* Auth Segmented Tabs */
.bixci-auth-tabs {
  display: flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}

.bixci-auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--bixci-text-muted);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bixci-auth-tab.active {
  background: #FFFFFF;
  color: var(--bixci-blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Form Fields */
.bixci-auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bixci-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bixci-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--bixci-text);
}

.bixci-form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--bixci-text-muted);
}

.bixci-forgot-link {
  color: var(--bixci-blue);
  text-decoration: none;
  font-weight: 600;
}

.bixci-forgot-link:hover {
  text-decoration: underline;
}

/* App Header */
.bixci-app-header {
  margin-bottom: 20px;
}

.bixci-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.bixci-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--bixci-font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--bixci-blue);
}

.bixci-brand strong {
  color: var(--bixci-text);
}

.bixci-header-actions {
  display: flex;
  gap: 8px;
}

.bixci-icon-btn {
  background: var(--bixci-card-bg);
  border: 1px solid var(--bixci-border);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bixci-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.bixci-icon-btn:hover {
  border-color: var(--bixci-blue);
  color: var(--bixci-blue);
}

/* User Hero Card */
.bixci-user-hero {
  background: linear-gradient(135deg, var(--bixci-blue) 0%, #002B75 100%);
  border-radius: var(--bixci-radius);
  padding: 20px;
  color: #FFFFFF;
  box-shadow: var(--bixci-shadow-lg);
  position: relative;
  overflow: hidden;
}

.bixci-user-hero::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: rgba(255, 219, 0, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.bixci-user-profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bixci-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.bixci-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bixci-yellow);
}

.bixci-avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: var(--bixci-yellow);
  color: var(--bixci-text);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border: 2px solid var(--bixci-blue);
  cursor: pointer;
}

.bixci-user-meta {
  flex: 1;
}

.bixci-user-name {
  font-family: var(--bixci-font-heading);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #FFFFFF;
}

.bixci-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--bixci-yellow);
  border: 1px solid rgba(255, 219, 0, 0.4);
}

/* Account Quick Bar */
.bixci-account-quick-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.bixci-quick-btn {
  background: var(--bixci-card-bg);
  border: 1px solid var(--bixci-border);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  text-decoration: none;
  color: var(--bixci-text);
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.bixci-quick-btn:hover {
  border-color: var(--bixci-blue);
  transform: translateY(-2px);
}

.bixci-quick-icon {
  font-size: 18px;
}

.bixci-quick-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--bixci-text);
}

.bixci-logout-link .bixci-quick-label {
  color: var(--bixci-danger);
}

/* Module Cards */
.bixci-module-card {
  background: var(--bixci-card-bg);
  border-radius: var(--bixci-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--bixci-shadow);
  border: 1px solid rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.bixci-card-title {
  font-family: var(--bixci-font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--bixci-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bixci-card-subtitle {
  font-size: 13px;
  color: var(--bixci-text-muted);
  margin-top: 2px;
}

/* Loyalty Points Widget */
.bixci-points-hero {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bixci-points-val {
  font-family: var(--bixci-font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #B45309;
}

.bixci-points-equiv {
  font-size: 13px;
  font-weight: 600;
  color: #92400E;
}

.bixci-progress-bar-wrap {
  background: #E5E7EB;
  border-radius: 10px;
  height: 10px;
  overflow: hidden;
  margin: 12px 0 6px 0;
}

.bixci-progress-bar-fill {
  background: linear-gradient(90deg, var(--bixci-blue) 0%, var(--bixci-yellow) 100%);
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.bixci-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--bixci-text-muted);
}

.bixci-birthday-box {
  background: var(--bixci-blue-light);
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
  border: 1px dashed var(--bixci-blue);
}

.bixci-birthday-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--bixci-blue);
  margin-bottom: 6px;
}

.bixci-birthday-form {
  display: flex;
  gap: 8px;
}

.bixci-input-date {
  flex: 1;
  border: 1px solid var(--bixci-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--bixci-font-body);
}

/* Garage Bike Selector */
.bixci-bike-card-active {
  background: #F3F4F6;
  border: 2px solid var(--bixci-blue);
  border-radius: 14px;
  padding: 16px;
  position: relative;
}

.bixci-bike-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bixci-blue);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.bixci-bike-title {
  font-family: var(--bixci-font-heading);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--bixci-text);
}

.bixci-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.bixci-spec-item {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--bixci-border);
}

.bixci-spec-label {
  font-size: 11px;
  color: var(--bixci-text-muted);
  display: block;
}

.bixci-spec-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--bixci-text);
}

.bixci-compatibility-banner {
  background: #ECFDF5;
  border: 1px solid #10B981;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #065F46;
}

/* Maintenance & Wear Module */
.bixci-wear-row {
  margin-bottom: 16px;
}

.bixci-wear-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.bixci-slider-km {
  width: 100%;
  accent-color: var(--bixci-blue);
  cursor: pointer;
  margin: 10px 0;
}

.bixci-strava-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FC6100;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  padding: 10px;
  border-radius: 12px;
  border: none;
  width: 100%;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 4px 12px rgba(252, 97, 0, 0.25);
}

/* Order Tracker Stepper */
.bixci-order-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 20px 0 16px 0;
}

.bixci-order-stepper::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #E5E7EB;
  z-index: 1;
}

.bixci-stepper-progress {
  position: absolute;
  top: 14px;
  left: 10%;
  height: 3px;
  background: var(--bixci-blue);
  z-index: 2;
  transition: width 0.4s ease;
}

.bixci-step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bixci-node-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #E5E7EB;
  color: var(--bixci-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.bixci-step-node.active .bixci-node-dot {
  background: var(--bixci-blue);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--bixci-blue-light);
}

.bixci-step-node.completed .bixci-node-dot {
  background: var(--bixci-success);
  color: #FFFFFF;
}

.bixci-node-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--bixci-text-muted);
  text-align: center;
}

.bixci-step-node.active .bixci-node-label {
  color: var(--bixci-blue);
  font-weight: 700;
}

/* Action Buttons Grid */
.bixci-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.bixci-btn-sec {
  background: #F3F4F6;
  border: 1px solid var(--bixci-border);
  color: var(--bixci-text);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.bixci-btn-sec:hover {
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.bixci-btn-primary {
  background: var(--bixci-yellow);
  color: var(--bixci-text);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(255, 219, 0, 0.4);
  transition: background 0.2s ease, transform 0.1s ease;
}

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

/* Floating Action Button Bar */
.bixci-floating-cta-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 9999;
}

.bixci-btn-cta-floating {
  width: 100%;
  background: var(--bixci-blue);
  color: #FFFFFF;
  font-family: var(--bixci-font-heading);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 20px;
  border-radius: 30px;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 70, 184, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.bixci-btn-cta-floating:hover {
  background: var(--bixci-blue-dark);
}

/* High-priority Modal Overlay strictly scoped for Mi biXci */
.bixci-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 999999 !important;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.bixci-modal-overlay.active {
  display: flex !important;
}

.bixci-modal-dialog {
  background: #FFFFFF !important;
  width: 100% !important;
  max-width: 520px !important;
  border-top-left-radius: 24px !important;
  border-top-right-radius: 24px !important;
  padding: 24px !important;
  position: relative !important;
  max-height: 85vh !important;
  overflow-y: auto !important;
  animation: bixciSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3) !important;
}

@keyframes bixciSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bixci-modal-close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  background: #F3F4F6 !important;
  border: none !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  font-size: 20px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #1A1A1A !important;
  z-index: 10 !important;
}

/* Skeleton Loading Animation */
.bixci-skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: 12px;
}

.bixci-skeleton-hero {
  height: 90px;
}

.bixci-skeleton-card {
  height: 140px;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
