/* KIDAPP.ORG — LIGHT & FRIENDLY FAMILY DESIGN SYSTEM */

:root {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --border-light: #e2e8f0;
  --border-active: #cbd5e1;

  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  
  --accent-ai: #0284c7;
  --accent-ai-light: #f0f9ff;

  --accent-gold: #f59e0b;
  --accent-gold-light: #fffbeb;
  
  --success: #10b981;
  --success-light: #ecfdf5;

  --danger: #ef4444;
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --shadow-soft: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 10px 25px -5px rgba(37, 99, 235, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: #f8fafc !important;
  color: #0f172a !important;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}

/* CONTAINER LAYOUT: MOBILE FIRST RESPONSIVE */
.app-container {
  display: grid;
  grid-template-columns: 1fr 360px;
  min-height: 100vh;
  width: 100vw;
  background: #f8fafc !important;
}

@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .child-simulator {
    display: none; /* Hide simulator on small mobile screens */
  }
}

/* PARENT DASHBOARD */
.parent-dashboard {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 16px 16px;
  gap: 16px;
  background: #f8fafc !important;
}

/* TOP BAR */
.top-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-ai {
  font-size: 0.65rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 800;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* FILA DEDICADA DE ACCIONES RÁPIDAS (3 COLUMNAS PERFECTAS) */
.top-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
  width: 100%;
}

.btn-quick-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-pause-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--danger-gradient);
  color: white;
  border: none;
  padding: 10px 10px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quick-action.warning {
  background: var(--accent-gold-light);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

.btn-quick-action.warning:hover {
  background: #fef3c7;
}

.btn-quick-action.info {
  background: var(--accent-ai-light);
  color: var(--accent-ai);
  border-color: rgba(2, 132, 199, 0.3);
}

.btn-quick-action.info:hover {
  background: #e0f2fe;
}

.btn-pause-all {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-gradient);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  transition: all 0.2s ease;
}

.btn-pause-all:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
}

.btn-pause-all.unpause {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* DEVICE QUICK STATUS */
.device-quick-status {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s ease;
}

.status-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--border-active);
}

.status-card.active-child {
  border-color: var(--primary);
  background: var(--primary-light);
}

.status-card .avatar {
  font-size: 1.6rem;
  background: var(--bg-subtle);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.status-card .info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.status-card .name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.status-tag {
  font-size: 0.75rem;
}

.status-tag.online {
  color: var(--success);
  font-weight: 600;
}

.status-card .metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.metric {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-card.add-child {
  justify-content: center;
  border-style: dashed;
  color: var(--primary);
  font-weight: 700;
}

/* MOBILE-FIRST BOTTOM / TAB NAVIGATION */
.dash-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-soft);
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn i {
  font-size: 1.1rem;
}

.tab-btn:hover {
  color: var(--text-dark);
  background: var(--bg-subtle);
}

.tab-btn.active {
  color: var(--primary);
  background: var(--primary-light);
}

.badge-tab {
  position: relative;
}

.badge-count {
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 800;
}

.badge-count.gold {
  background: var(--accent-gold);
  color: black;
}

/* TAB PANELS */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* LIGHT CARDS */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

/* OVERVIEW GRID */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

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

.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-time {
  font-size: 0.75rem;
  background: var(--success-light);
  color: #047857;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.progress-bar-container {
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.usage-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-usage-item {
  display: grid;
  grid-template-columns: 36px 130px 1fr;
  align-items: center;
  gap: 10px;
}

.app-icon {
  font-size: 1.3rem;
}

.app-meta {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
}

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

.app-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 6px;
  overflow: hidden;
}

.app-bar .fill {
  height: 100%;
  background: var(--primary);
  border-radius: 6px;
}

.app-bar .fill.warning {
  background: var(--accent-gold);
}

/* AI WIDGET */
.widget-ai-summary .ai-box {
  background: var(--accent-ai-light);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
}

.chip-good {
  background: var(--success-light);
  color: #047857;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ACTIVITY FEED */
.activity-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.feed-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.feed-icon.gps { background: var(--success-light); color: var(--success); }
.feed-icon.lock { background: #fef2f2; color: var(--danger); }
.feed-icon.ai { background: var(--accent-ai-light); color: var(--accent-ai); }

.feed-details {
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
  color: var(--text-dark);
}

.feed-details .time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* GPS & MAP LAYOUT */
.gps-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: 520px;
}

@media (max-width: 768px) {
  .gps-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.timeline-rewind-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.timeline-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}

#time-slider {
  width: 100%;
  accent-color: var(--primary);
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.gps-status-indicators {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  font-size: 0.78rem;
}

.ind-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.zone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.zone-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.zone-item.active {
  border-color: var(--success);
  background: var(--success-light);
}

.zone-title {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
}

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

.badge-inside {
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}

.badge-outside {
  font-size: 0.7rem;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
}

.btn-primary {
  width: 100%;
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

#leaflet-map {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border-radius: 16px;
  z-index: 1;
}

/* GAMIFIED CHORES TAB */
.chores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.hero-chores-card {
  background: linear-gradient(135deg, #fffbeb 0%, #eff6ff 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.chore-approval-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px;
  margin-top: 10px;
}

.chore-title {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.chore-reward {
  font-size: 0.78rem;
  color: #b45309;
  font-weight: 700;
}

.btn-approve-chore {
  background: var(--accent-gold);
  color: black;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s ease;
}

.btn-approve-chore:hover { transform: scale(1.04); }

.add-chore-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.input-text {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-dark);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
}

/* CALL FILTERING TAB */
.whitelist-box {
  margin-top: 12px;
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip-contact {
  background: var(--success-light);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}

.blocked-calls-log {
  margin-top: 20px;
}

/* APPS & SCHEDULES */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.routines-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.routine-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
}

.r-title {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dark);
}

.r-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* TOGGLE SWITCH */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-light);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

/* APP CONTROL LIST */
.apps-control-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.app-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.app-details {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-details .title {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.app-details .sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.app-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-limit {
  background: var(--bg-card);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  padding: 6px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-icon-lock {
  background: #fef2f2;
  color: var(--danger);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* AI MEDIATOR TAB */
.ai-hero-card {
  margin-bottom: 16px;
}

.ai-badge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-ai);
  margin-bottom: 6px;
}

.request-card {
  background: var(--accent-ai-light);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 18px;
  padding: 18px;
  margin-top: 12px;
}

.req-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.child-tag {
  font-weight: 700;
  color: var(--accent-ai);
}

.req-body {
  margin-bottom: 14px;
}

.req-reason {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.ai-eval {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--bg-card);
  padding: 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.ai-eval i {
  color: var(--accent-ai);
  flex-shrink: 0;
}

.req-actions {
  display: flex;
  gap: 10px;
}

.btn-approve {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-deny {
  background: var(--bg-card);
  color: var(--text-dark);
  border: 1px solid var(--border-light);
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ONBOARDING QR & PACT */
.qr-flex {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--bg-subtle);
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
}

.qr-box img { width: 150px; height: 150px; }

.qr-instructions ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.pact-rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.pact-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.pact-rule .num {
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.8rem;
}

.signatures {
  display: flex;
  gap: 30px;
  margin-top: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

.sig-line {
  font-family: cursive;
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 4px;
}

/* RIGHT PANEL: CHILD DEVICE SIMULATOR */
.child-simulator {
  background: #f1f5f9;
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
  color: var(--text-dark);
}

.simulator-header {
  text-align: center;
  margin-bottom: 16px;
}

.simulator-header .title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.simulator-header .sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* PHONE FRAME */
.phone-frame {
  width: 290px;
  height: 580px;
  background: #000;
  border: 10px solid #1e293b;
  border-radius: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 110px;
  height: 18px;
  background: #1e293b;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 100;
}

.phone-screen {
  flex: 1;
  background: #0f172a;
  background-image: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.25), transparent 70%);
  display: flex;
  flex-direction: column;
  padding: 24px 14px 14px 14px;
  color: white;
  position: relative;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.screen-view {
  display: none;
  flex-direction: column;
  height: 100%;
}

.screen-view.active {
  display: flex;
}

.widget-time-rem {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 16px;
  font-size: 0.75rem;
}

.widget-time-rem h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 2px;
}

.app-grid-mock {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.app-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.app-tile:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.15);
}

.tile-icon { font-size: 1.8rem; }
.tile-name { font-size: 0.75rem; font-weight: 700; }

.sim-actions-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-sim-ask {
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
  border: 1px solid #38bdf8;
  padding: 9px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-sim-sos {
  background: var(--danger-gradient);
  color: white;
  border: none;
  padding: 9px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* LOCKED SCREEN VIEW */
#screen-locked {
  background: rgba(15, 23, 42, 0.95);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.lock-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lock-icon {
  font-size: 3rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.lock-overlay-content h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.lock-overlay-content p {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.ai-encouragement {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.3);
  padding: 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.btn-sim-ask-locked {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
