/* ==========================================================================
   Trio 90-Day Streak Challenge - Premium Mobile-First Stylesheet
   Design Philosophy: Deep Glassmorphism, Ambient Glows, Tactile Micro-Interactions
   ========================================================================== */

:root {
  --bg-primary: #070a12;
  --bg-gradient: radial-gradient(circle at 50% 0%, #151d30 0%, #070a12 70%);
  --surface-glass: rgba(17, 24, 39, 0.72);
  --surface-glass-hover: rgba(24, 34, 53, 0.85);
  --surface-glass-border: rgba(255, 255, 255, 0.09);
  --surface-card: #0f1626;

  /* Brand Accents */
  --accent-cyan: #38bdf8;
  --accent-blue: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-gold: #fbbf24;
  --accent-rose: #f43f5e;

  /* Champion Themes */
  --saeed-color: #38bdf8;
  --saeed-gradient: linear-gradient(135deg, #38bdf8, #6366f1);
  --hazem-color: #10b981;
  --hazem-gradient: linear-gradient(135deg, #34d399, #059669);
  --osama-color: #f59e0b;
  --osama-gradient: linear-gradient(135deg, #fbbf24, #ea580c);

  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Radii & Shadows */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-glow-cyan: 0 0 25px rgba(56, 189, 248, 0.25);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.25);
  --shadow-glow-gold: 0 0 30px rgba(251, 191, 36, 0.3);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45);

  --font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body {
  background: var(--bg-primary);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  direction: rtl;
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.5;
}

/* Canvas Confetti */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* App Container (Mobile First Container) */
.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.app-header {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 0.65rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 10px #6366f1;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 14px #6366f1; }
}

.app-title {
  font-size: 1.85rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.app-subtitle {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

/* Active Date Container */
.active-date-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.date-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.date-icon {
  font-size: 1rem;
}

.date-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
}

.start-date-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.start-date-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  font-family: var(--font-family);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.start-date-input:focus {
  border-color: var(--accent-cyan);
}

/* ==========================================================================
   Hero Progress Card (Circular Indicator & Streak Stats)
   ========================================================================== */
.hero-card {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 140px;
  background: radial-gradient(ellipse, rgba(56, 189, 248, 0.15), transparent 70%);
  pointer-events: none;
}

/* Circular SVG Progress */
.progress-circle-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 10;
}

.progress-ring-fill {
  fill: none;
  stroke: url(#progressGradient);
  stroke: var(--accent-gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
}

.progress-circle-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.day-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.current-day-number {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.total-days-target {
  font-size: 0.75rem;
  color: var(--accent-gold);
  font-weight: 700;
}

/* Streak Stats Row */
.streak-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.65rem;
  margin-bottom: 1.25rem;
}

.stat-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: center;
}

.stat-icon {
  font-size: 1.25rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-title {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

/* Today Sync Status Progress */
.today-sync-status {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-header strong {
  color: #fff;
  font-size: 0.95rem;
}

.status-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.25);
  transition: all 0.3s ease;
}

.status-pill.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.status-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* ==========================================================================
   The 3 Champions Section (Cards)
   ========================================================================== */
.champions-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.section-title-row h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.section-hint {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.champions-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Single Champion Card */
.champion-card {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.champion-card:active {
  transform: scale(0.985);
}

.champion-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

/* Distinct color border accent per champion */
.champion-card[data-user-id="saeed"]::before { background: var(--saeed-gradient); }
.champion-card[data-user-id="hazem"]::before { background: var(--hazem-gradient); }
.champion-card[data-user-id="osama"]::before { background: var(--osama-gradient); }

.champion-card.is-done {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.champion-card.is-pending {
  border-color: rgba(245, 158, 11, 0.25);
}

.champ-left-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.champ-avatar-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.champion-card[data-user-id="saeed"] .champ-avatar-wrap { border-color: rgba(56, 189, 248, 0.4); }
.champion-card[data-user-id="hazem"] .champ-avatar-wrap { border-color: rgba(16, 185, 129, 0.4); }
.champion-card[data-user-id="osama"] .champ-avatar-wrap { border-color: rgba(245, 158, 11, 0.4); }

.champ-details {
  display: flex;
  flex-direction: column;
}

.champ-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.champ-code-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 600;
}

.champ-status-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.champ-status-desc.done {
  color: #34d399;
  font-weight: 700;
}

/* Action Checkin Button */
.champ-action-btn {
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.champ-action-btn.btn-checkin {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.champion-card[data-user-id="hazem"] .champ-action-btn.btn-checkin {
  background: linear-gradient(135deg, #34d399, #059669);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.champion-card[data-user-id="osama"] .champ-action-btn.btn-checkin {
  background: linear-gradient(135deg, #fbbf24, #ea580c);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.champ-action-btn.btn-checkin:active {
  transform: scale(0.95);
}

.champ-action-btn.btn-completed-view {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  cursor: default;
}

/* ==========================================================================
   Quick Actions Row (Cloud Status, Sound, Config, Reset)
   ========================================================================== */
.quick-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.75rem;
}

.cloud-status-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite ease-in-out;
}

.status-dot.offline {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.quick-actions-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.action-btn {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-glass-border);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:active {
  transform: scale(0.95);
}

.sound-toggle-btn, .config-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.reset-danger-btn {
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.25);
  color: #fda4af;
  padding: 0.5rem 0.75rem;
}

.reset-danger-btn:hover {
  background: rgba(244, 63, 94, 0.2);
}

.cloud-helper-tip {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  color: #c7d2fe;
  line-height: 1.45;
}

/* ==========================================================================
   90-Day Calendar Matrix Section
   ========================================================================== */
.matrix-section {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.matrix-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.matrix-legend {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-dot.done {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.badge-dot.current {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

.badge-dot.locked {
  background: rgba(255, 255, 255, 0.15);
}

/* The 90-Day Grid (10 columns or flexible) */
.days-matrix-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.4rem;
  max-height: 290px;
  overflow-y: auto;
  padding: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.days-matrix-grid::-webkit-scrollbar {
  width: 4px;
}
.days-matrix-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.day-cell {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.day-cell.completed {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.day-cell.current-day {
  background: rgba(251, 191, 36, 0.18);
  border-color: #fbbf24;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
  animation: currentDayPulse 1.8s infinite;
}

.day-cell.completed.current-day {
  background: rgba(16, 185, 129, 0.28);
  border-color: #10b981;
  color: #fff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6);
  animation: todayDonePulse 2.5s infinite ease-in-out;
}

@keyframes currentDayPulse {
  0%, 100% { transform: scale(1); border-color: #fbbf24; }
  50% { transform: scale(1.06); border-color: #fff; }
}

@keyframes todayDonePulse {
  0%, 100% { transform: scale(1); border-color: #10b981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
  50% { transform: scale(1.04); border-color: #34d399; box-shadow: 0 0 18px rgba(52, 211, 153, 0.7); }
}

.day-cell.locked {
  opacity: 0.45;
}

.day-check-badge {
  font-size: 0.55rem;
  position: absolute;
  bottom: 2px;
  left: 2px;
}

/* ==========================================================================
   Modals & Popups (PIN, Reset, Sync)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.25s ease;
}

@media (min-width: 520px) {
  .modal-backdrop {
    align-items: center;
    padding: 1.5rem;
  }
}

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

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px 24px 0 0;
  padding: 1.75rem 1.25rem 2rem;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 520px) {
  .modal-card {
    border-radius: var(--radius-lg);
  }
}

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

.modal-close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

.pin-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.pin-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.65rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.pin-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.pin-header p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* PIN Display (3 dots/digits) */
.pin-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.pin-digit {
  width: 46px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-cyan);
  transition: all 0.2s ease;
}

.pin-digit.filled {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.pin-error-msg {
  text-align: center;
  color: var(--accent-rose);
  font-size: 0.8rem;
  font-weight: 700;
  min-height: 1.4rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

/* Keypad Grid (3x4) */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.key-btn {
  padding: 0.85rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: var(--font-family);
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.key-btn:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.94);
}

.key-clear, .key-backspace {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.pin-hint-box {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hint-tag {
  font-weight: 800;
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.12);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Reset Modal Special Styling */
.reset-card {
  text-align: center;
}

.danger-icon-badge {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.reset-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.reset-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.reset-alert-box {
  margin: 1rem 0;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.8rem;
  color: #fbbf24;
  font-weight: 600;
}

.modal-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-family);
  font-size: 0.92rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:active {
  transform: scale(0.97);
}

.btn-danger-confirm {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  box-shadow: 0 4px 20px rgba(244, 63, 94, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Sync Modal Options */
.sync-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: right;
}

.btn-whatsapp {
  background: #25d366;
  color: #052e16;
  font-weight: 800;
}

.btn-copy {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
}

.code-box-wrap, .import-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.code-box-wrap label, .import-wrap label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.code-input-row {
  display: flex;
  gap: 0.5rem;
}

.code-input-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  color: #fff;
  font-family: monospace;
  font-size: 0.85rem;
  direction: ltr;
  text-align: left;
}

.code-input-row button {
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--font-family);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary-apply {
  background: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #fff !important;
}

/* Clickable Cloud Status Badge */
.cloud-status-badge.clickable {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.cloud-status-badge.clickable:hover {
  background: rgba(255, 255, 255, 0.07);
}

/* Reset PIN Security */
.reset-pin-protect {
  margin: 0.85rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: right;
}

.reset-pin-protect label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.reset-pin-input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.4em;
  outline: none;
  transition: border-color 0.2s;
}

.reset-pin-input:focus {
  border-color: #f43f5e;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.3);
}

.reset-pin-err {
  font-size: 0.75rem;
  color: #fda4af;
  font-weight: 700;
  display: none;
}

.reset-pin-err.visible {
  display: block;
}

/* Settings Modal Elements */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: right;
}

.settings-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  color: #38bdf8;
  font-family: monospace;
  font-size: 0.85rem;
  outline: none;
  direction: ltr;
  text-align: left;
  transition: border-color 0.2s;
}

.settings-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.settings-status-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
}

.status-indicator-dot.success {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-indicator-dot.error {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.status-indicator-dot.checking {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 1s infinite ease-in-out;
}

.settings-guide-card {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: right;
  line-height: 1.5;
}

.guide-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #a5b4fc;
  margin-bottom: 0.5rem;
}

.guide-steps {
  font-size: 0.76rem;
  color: var(--text-secondary);
  padding-right: 1.2rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.guide-steps a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.guide-steps code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: #34d399;
  font-family: monospace;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-footer p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-style: italic;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
}
