/* =========================================================
   VRV ACS SUBSCRIBER SELF-CARE APP (HIGH-DENSITY NOC THEME)
   8px Spacing • 12-Col Grid • Dark Layered Surfaces • JetBrains Mono
   ========================================================= */

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

:root {
  --bg-app: #090e1a;
  --bg-topbar: #0c101d;
  --bg-card: #0d1322;
  --bg-card-inner: #101726;
  --bg-input: #101626;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-focus: #38bdf8;

  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --cyan: #38bdf8;
  --purple: #a855f7;

  --text-main: #ffffff;
  --text-sub: #cbd5e1;
  --text-muted: #64748b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 80px; /* space for bottom nav */
  -webkit-font-smoothing: antialiased;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* 1. CUSTOMER LOGIN OVERLAY */
.cust-login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-app);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cust-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.cust-brand-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.cust-brand-header h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.cust-brand-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.cust-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cust-input-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.95rem;
  color: #64748b;
}

.cust-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  color: #ffffff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.15s ease;
}

.input-wrapper .cust-input {
  padding-left: 2.35rem;
}

.cust-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.btn-cust-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.8rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transition: all 0.15s ease;
}

.btn-cust-primary:hover {
  background: #1d4ed8;
}

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

/* 2. MAIN APP SHELL */
.cust-app-shell {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPBAR */
.cust-topbar {
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.cust-top-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cust-top-icon {
  width: 38px;
  height: 38px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--cyan);
}

.cust-top-brand h2 {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.cust-sub-status {
  font-size: 0.72rem;
  color: #94a3b8;
}

.cust-top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cust-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cust-badge.online {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.cust-badge.offline {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.btn-cust-icon {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cust-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-cust-action-pwa {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--cyan);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

/* MAIN CONTENT VIEWPORT */
.cust-main-content {
  flex: 1;
  padding: 1.25rem 1rem;
}

.cust-tab-view {
  display: none;
}

.cust-tab-view.active {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

/* OPTICAL HERO CARD */
.optical-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.optical-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.optical-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.optical-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.2rem;
}

.optical-score-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
}

.optical-meter-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.optical-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 100%);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.optical-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.opt-stat-item {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.opt-stat-lbl {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

.opt-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}

/* QUICK ACTION BUTTONS GRID */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.quick-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.quick-action-card:hover {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.qa-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 0.25rem;
}

.quick-action-card strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.quick-action-card span {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* ROUTER INFO CARD */
.cust-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.cust-info-card h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span {
  color: #94a3b8;
}

.info-row strong {
  color: #ffffff;
}

/* SECTION TITLE */
.section-title {
  margin-bottom: 1.25rem;
}

.section-title h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}

.section-title p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* WIFI BAND CARDS */
.wifi-band-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.wifi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.band-tag {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
}

.btn-toggle-eye {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
}

/* CONNECTED DEVICES LIST */
.devices-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.device-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.device-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.device-icon-box {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* SPEEDTEST CARD */
.speedtest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.25rem;
  text-align: center;
}

.speed-dial {
  margin: 1rem auto 1.5rem auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(9, 14, 26, 0.8) 70%);
  border: 2px solid rgba(16, 185, 129, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.speed-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #10b981;
  font-family: var(--font-mono);
  line-height: 1;
}

.speed-unit {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.speed-state-lbl {
  font-size: 0.68rem;
  color: var(--cyan);
  margin-top: 0.15rem;
}

.speed-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.metric-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
}

.metric-box span {
  font-size: 0.68rem;
  color: #94a3b8;
}

.metric-box strong {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-top: 0.2rem;
}

/* SUPPORT & TICKETS */
.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.ticket-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

/* BOTTOM NAVIGATION BAR */
.cust-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-topbar);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 50;
  max-width: 680px;
  margin: 0 auto;
}

.nav-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #64748b;
  cursor: pointer;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.nav-icon {
  font-size: 1.15rem;
}

.nav-lbl {
  font-size: 0.68rem;
  font-weight: 600;
}

.nav-item.active {
  color: var(--cyan);
}

.nav-item.active .nav-lbl {
  font-weight: 700;
}

/* TOAST */
.cust-toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #101626;
  border: 1px solid var(--border-color);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 99999;
}
