/* ==========================================================================
   BAOBAB RISE - Android Mobile Experience & Step-by-Step Flow Styles
   Material 3 & Luxury Sports-Edtech Architecture
   ========================================================================== */

:root {
  --android-primary: #0284c7;
  --android-primary-dark: #0369a1;
  --android-surface: #ffffff;
  --android-bg: #f8fafc;
  --android-text: #0f172a;
  --android-muted: #64748b;
  --android-radius: 16px;
  --android-radius-sm: 10px;
}

/* Mobile Auth Container */
#mobileAuthContainer {
  min-height: 100vh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--android-bg);
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
}

@media (max-width: 768px) {
  #mobileAuthContainer {
    max-width: 100%;
    box-shadow: none;
  }
}

.android-auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: var(--android-text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  animation: androidFadeIn 0.25s ease-out;
}

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

/* Status Bar */
.android-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 4px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  background: transparent;
}

.status-bar-icons {
  display: flex;
  gap: 6px;
  font-size: 13px;
}

/* Top App Bar */
.android-top-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-bar-btn {
  background: #f1f5f9;
  border: none;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.top-bar-btn:active {
  background: #e2e8f0;
  transform: scale(0.96);
}

.top-bar-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.top-bar-step {
  font-size: 11px;
  font-weight: 800;
  background: #e0f2fe;
  color: #0284c7;
  padding: 4px 10px;
  border-radius: 9999px;
}

/* Auth Body */
.android-auth-body {
  padding: 20px 22px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Step Progress Indicator */
.step-progress-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  margin-bottom: 22px;
  overflow: hidden;
}

.step-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #22c55e);
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Headings */
.auth-heading {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.auth-subheading {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.45;
  margin-bottom: 22px;
}

/* Role Selection Grid */
.role-selection-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-card-touch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.role-card-touch:active {
  transform: scale(0.98);
}

.role-card-touch.selected {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
}

.role-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

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

.role-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.role-card-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.role-card-radio {
  font-size: 18px;
  color: #0284c7;
  font-weight: 800;
}

/* Role Badge Pill in Step 2 */
.role-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  width: fit-content;
}

/* Android Forms */
.android-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 6px;
}

.android-input, .android-select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  font-size: 14.5px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.android-input:focus, .android-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .android-input {
  padding-right: 48px;
}

.eye-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  opacity: 0.6;
}

.eye-toggle-btn:hover {
  opacity: 1;
}

.demo-auto-hint {
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  color: #1d4ed8;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin: 14px 0;
  text-align: center;
  transition: background 0.15s;
}

.demo-auto-hint:active {
  background: #dbeafe;
}

/* Action Buttons */
.auth-bottom-actions {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.android-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

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

.android-btn.primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

.android-btn.secondary {
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #e2e8f0;
}

.android-btn.text {
  background: transparent;
  color: #64748b;
  font-size: 13.5px;
  padding: 10px;
}

/* Welcome Screen Aesthetics */
.android-welcome-bg {
  background: #0f172a;
  color: #ffffff;
}

.android-welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.welcome-hero-image-wrap {
  position: relative;
  height: 380px;
  overflow: hidden;
}

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

.welcome-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.welcome-brand-badge {
  position: absolute;
  top: 24px;
  left: 20px;
  z-index: 5;
}

.welcome-card-body {
  background: #0f172a;
  padding: 0 24px 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.welcome-pill {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  margin-bottom: 12px;
  width: fit-content;
}

.welcome-main-title {
  font-size: 32px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.welcome-subtitle {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 28px;
}

.welcome-action-buttons {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-action-buttons .android-btn.secondary {
  background: #1e293b;
  color: #ffffff;
  border-color: #334155;
}

/* Global Mobile Responsiveness Overrides (< 768px) */
@media (max-width: 768px) {
  body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  .main-workspace {
    padding: 0 !important;
  }

  .admin-layout {
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    max-height: 60px !important;
    overflow-x: auto !important;
    display: flex !important;
    padding: 6px !important;
    position: sticky !important;
    top: 56px !important;
    z-index: 15 !important;
    background: #0f172a !important;
  }

  .sidebar-menu {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    width: max-content !important;
  }

  .sidebar-item {
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
    border-radius: 9999px !important;
  }

  .admin-body {
    padding: 12px 10px 80px !important;
  }

  .admin-card {
    padding: 14px 12px !important;
    border-radius: 14px !important;
    margin-bottom: 16px !important;
  }

  .card-header-bar {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  .admin-toolbar-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .attendance-kpi-grid, .admin-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .attendance-kpi-card {
    padding: 12px 10px !important;
  }

  .attendance-kpi-val {
    font-size: 18px !important;
  }

  .admin-table {
    min-width: 600px !important;
  }

  .phone-mockup-wrapper.phone-frame {
    width: 100% !important;
    height: 100vh !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .phone-mockup-wrapper.full-width {
    max-width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .simulator-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
  }

  .mobile-screens-navbar {
    display: none !important;
  }

  .phone-notch-bar {
    padding: 8px 16px 4px !important;
    border-radius: 0 !important;
    font-size: 12px !important;
  }

  .mobile-app-header {
    padding: 12px 16px 14px !important;
    border-radius: 0 !important;
  }

  .mobile-screen-content {
    border-radius: 0 !important;
    height: auto !important;
    min-height: calc(100vh - 120px) !important;
    padding: 14px 14px 85px !important;
    box-sizing: border-box !important;
  }

  .phone-screen {
    border-radius: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    width: 100% !important;
    overflow-y: auto !important;
    padding-bottom: 70px !important;
  }

  .mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    z-index: 100 !important;
    padding-bottom: env(safe-area-inset-bottom, 8px) !important;
    background: #ffffff !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
  }

  /* Top Role Bar & Workspace Header on Mobile */
  .top-role-bar {
    padding: 8px 12px !important;
    gap: 8px !important;
  }

  .role-switcher-group {
    display: none !important;
  }

  .view-controls .device-toggle-btn:not(:last-child) {
    display: none !important;
  }

  /* Landing Page Mobile Fixes */
  .landing-nav {
    padding: 10px 16px !important;
  }

  .landing-nav-links {
    display: none !important;
  }

  .btn-admin-login-nav {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }

  .landing-hero {
    padding: 80px 16px 40px !important;
  }

  .hero-container {
    flex-direction: column !important;
    gap: 24px !important;
  }

  .hero-main-title {
    font-size: 2.1rem !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

  .hero-cta-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .btn-hero-glow-portal, .btn-hero-demo {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 14px 18px !important;
  }

  .landing-stats-banner {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  .stat-box {
    padding: 10px 8px !important;
  }

  .stat-number {
    font-size: 1.6rem !important;
  }

  .stat-label {
    font-size: 11.5px !important;
  }

  .programs-grid, .features-grid, .curriculum-grid, .schools-showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Tables & Horizontal Scroll Container */
  .admin-table-container, .table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Dialogs & Overlays */
  .modal-box {
    width: 92% !important;
    max-width: 440px !important;
    margin: 20px auto !important;
  }

  /* Forms & Touch Targets */
  input, select, textarea, button {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

