/* ZTE BE7200 MAX - Futuristic Cyberpunk & Glassmorphism Overlay */
:root {
  --overlay-bg: rgba(13, 17, 23, 0.85);
  --overlay-border: rgba(0, 240, 255, 0.3);
  --overlay-glow: rgba(0, 240, 255, 0.15);
  --cyan-primary: #00f0ff;
  --cyan-hover: #33f3ff;
  --blue-primary: #12b0cf;
  --accent-green: #00e676;
  --accent-red: #ff3366;
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --modal-bg: rgba(18, 24, 38, 0.95);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Floating Overlay Header Bar */
#zte-overlay-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--overlay-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--overlay-glow);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--text-primary);
  user-select: none;
}

/* Push router page content down so top bar doesn't obscure anything */
body {
  padding-top: 48px !important;
}

.zte-bar-left, .zte-bar-right, .zte-bar-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zte-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--cyan-primary);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.zte-brand svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.zte-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.zte-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
}

.zte-dot.online {
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.zte-dot.offline {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

/* Action Buttons */
.zte-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.zte-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.zte-btn-primary {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  border: none;
  color: #fff;
}

.zte-btn-primary:hover {
  background: linear-gradient(135deg, #00e1ff, #0088ff);
  box-shadow: 0 0 15px rgba(0, 198, 255, 0.5);
  color: #fff;
}

.zte-btn-success {
  background: linear-gradient(135deg, #00e676, #00b0ff);
  border: none;
  color: #0b1528;
  font-weight: 700;
}

/* Language selector */
.zte-lang-group {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.zte-lang-btn {
  padding: 3px 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}

.zte-lang-btn.active {
  background: var(--cyan-primary);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

/* Modal Overlay & Dialog */
.zte-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  animation: zteFadeIn 0.25s ease-out;
}

.zte-modal-card {
  width: 480px;
  max-width: 90vw;
  background: var(--modal-bg);
  border: 1px solid var(--overlay-border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px var(--overlay-glow);
  padding: 24px;
  color: var(--text-primary);
  font-family: var(--font-family);
  animation: zteScaleUp 0.25s ease-out;
}

.zte-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.zte-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--cyan-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.zte-modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.zte-modal-close:hover {
  color: #fff;
}

.zte-form-group {
  margin-bottom: 16px;
}

.zte-form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #c9d1d9;
}

.zte-form-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.zte-input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

select.zte-input option {
  background: #161e2e;
  color: #fff;
  padding: 8px;
}

.zte-input:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.zte-input-toggle {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
}

.zte-switch-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
}

.zte-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Toast alert notification */
#zte-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(18, 24, 38, 0.95);
  border: 1px solid var(--cyan-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
  z-index: 100001;
  display: none;
  animation: zteFadeIn 0.2s ease-out;
}

@keyframes zteFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zteScaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ========================================================
   4-Digit Passcode Lock Screen & Keypad
   ======================================================== */
#zte-passcode-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, rgba(18, 28, 48, 0.98) 0%, rgba(8, 12, 20, 0.99) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  user-select: none;
  font-family: var(--font-family);
  animation: zteFadeIn 0.3s ease-out;
}

.zte-passcode-card {
  width: 380px;
  max-width: 94vw;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 240, 255, 0.2);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: zteScaleUp 0.3s ease-out;
}

.zte-passcode-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(0, 114, 255, 0.2));
  border: 2px solid var(--cyan-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.zte-passcode-logo svg {
  width: 32px;
  height: 32px;
  fill: var(--cyan-primary);
}

.zte-passcode-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.zte-passcode-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 22px;
  line-height: 1.4;
}

.zte-pin-inputs {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 14px;
}

.zte-pin-box {
  width: 52px;
  height: 58px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.45);
  color: var(--cyan-primary);
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  -webkit-appearance: none;
}

.zte-pin-box:focus, .zte-pin-box.filled {
  border-color: var(--cyan-primary);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.zte-pin-error {
  min-height: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #ff4d6d;
  margin-bottom: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}

.zte-pin-error.visible {
  opacity: 1;
}

.zte-pin-shake {
  animation: zteShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes zteShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Touch & Mobile Keypad */
.zte-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 270px;
  margin-top: 6px;
}

.zte-key-btn {
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.zte-key-btn:active {
  background: var(--cyan-primary);
  color: #000;
  transform: scale(0.95);
  box-shadow: 0 0 12px var(--cyan-primary);
}

.zte-key-btn.empty {
  visibility: hidden;
  pointer-events: none;
}

/* ========================================================
   Master Settings Modal with Tabs
   ======================================================== */
.zte-master-card {
  width: 640px;
  max-width: 95vw;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--modal-bg);
  border: 1px solid var(--overlay-border);
  border-radius: 16px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.7), 0 0 30px var(--overlay-glow);
  padding: 24px;
  color: var(--text-primary);
  font-family: var(--font-family);
  animation: zteScaleUp 0.25s ease-out;
  display: flex;
  flex-direction: column;
}

.zte-master-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.zte-tab-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.zte-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.zte-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.zte-tab-pane {
  display: none;
}

.zte-tab-pane.active {
  display: block;
  animation: zteFadeIn 0.2s ease-out;
}

/* Feature Menu Toggles Grid */
.zte-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .zte-features-grid {
    grid-template-columns: 1fr;
  }
}

.zte-feature-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.zte-feature-item:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

.zte-feature-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.zte-feature-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.zte-feature-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

/* iOS Style Switch */
.zte-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.zte-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.zte-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.zte-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.zte-toggle-switch input:checked + .zte-toggle-slider {
  background-color: var(--cyan-primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.zte-toggle-switch input:checked + .zte-toggle-slider:before {
  transform: translateX(20px);
  background-color: #0d131f;
}

/* Health Check Diagnostics Card */
.zte-health-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zte-health-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zte-health-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.zte-health-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}

.zte-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--cyan-primary);
}

.zte-stat-lbl {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Mobile Responsive Optimization (<= 768px) */
.zte-btn-hamburger {
  display: none;
}

@media (max-width: 768px) {
  #zte-overlay-bar {
    padding: 0 12px;
    height: 48px;
  }

  .zte-bar-center {
    display: none;
  }

  .zte-status-badge {
    font-size: 11px;
    padding: 2px 6px;
  }

  #zte-btn-autologin span.btn-text,
  #zte-btn-settings span.btn-text,
  #zte-btn-direct span.btn-text {
    display: none;
  }

  .zte-btn-hamburger {
    display: inline-flex !important;
    padding: 6px 10px;
    font-size: 16px;
  }

  .zte-mobile-drawer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--overlay-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    padding: 16px;
    z-index: 99998;
    transform: translateY(-120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .zte-mobile-drawer.open {
    transform: translateY(0);
  }

  .zte-mobile-drawer .zte-lang-group {
    width: 100%;
    justify-content: stretch;
  }

  .zte-mobile-drawer .zte-lang-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 13px;
    text-align: center;
  }

  .zte-mobile-drawer .zte-drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .zte-modal-card, .zte-master-card {
    padding: 16px;
    border-radius: 14px;
    max-height: 85vh;
  }

  .zte-input {
    font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
  }
}
