/* ─────────────────────────────────────────────
   SUPERVISIÓN OPERATIVA — App CSS
   Mobile-first PWA
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700&display=swap');

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

:root {
  --navy:      #1D3557;
  --navy-dark: #162840;
  --navy-lt:   #B5D4F4;
  --navy-xlt:  #E6F1FB;
  --red:       #E84855;
  --cream:     #F7F6F2;
  --white:     #ffffff;
  --border:    #D3D1C7;
  --gray:      #888780;
  --gray-dk:   #5F5E5A;
  --text:      #2C2C2A;
  --green-bg:  #EAF3DE;
  --green-tx:  #3B6D11;
  --amber-bg:  #FAEEDA;
  --amber-tx:  #854F0B;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

html, body {
  height: 100%;
  background: var(--cream);
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout base ── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
}

/* ── Topbar ── */
.topbar {
  background: var(--navy);
  padding: 16px 20px 20px;
  flex-shrink: 0;
}
.topbar h1 { color: var(--white); font-size: 20px; font-weight: 700; }
.topbar p  { color: var(--navy-lt); font-size: 13px; margin-top: 3px; }

.topbar-sub {
  background: var(--navy);
  padding: 12px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.topbar-sub h2 { color: var(--white); font-size: 17px; font-weight: 700; }

.back-btn {
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--white);
  border-radius: 10px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 18px;
  text-decoration: none;
}
.back-btn:hover { background: rgba(255,255,255,0.2); }

/* ── Scrollable content ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Stat cards ── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 0.5px solid var(--border);
}
.stat-card.accent { background: var(--navy); }
.stat-card .label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gray); margin-bottom: 4px;
}
.stat-card.accent .label { color: #7DB4D8; }
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-card.accent .value { color: var(--white); }
.stat-card .sub { font-size: 11px; color: var(--gray-dk); margin-top: 4px; }
.stat-card.accent .sub { color: var(--navy-lt); }

/* ── Section title ── */
.section-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--gray); margin-top: 4px;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  padding: 16px;
}

.cell-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 0.5px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.cell-card:active { background: #F1EFE8; }

.cell-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--navy-xlt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 20px; color: #185FA5;
}
.cell-info { flex: 1; min-width: 0; }
.cell-info h3 {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell-info p { font-size: 12px; color: var(--gray); }

/* ── Badges ── */
.badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 20px;
  white-space: nowrap;
}
.badge-green  { background: var(--green-bg); color: var(--green-tx); }
.badge-amber  { background: var(--amber-bg); color: var(--amber-tx); }
.badge-blue   { background: var(--navy-xlt); color: #185FA5; }
.badge-red    { background: #FDECEA; color: #B71C1C; }
.badge-navy   { background: var(--navy); color: var(--white); }

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: 74px; right: 16px;
  z-index: 100;
}
.fab a, .fab button {
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 13px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(232,72,85,0.35);
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--white);
  border-top: 0.5px solid var(--border);
  display: flex;
  padding: 8px 0 max(12px, env(safe-area-inset-bottom));
  z-index: 200;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  cursor: pointer;
  text-decoration: none;
  padding: 2px 0;
}
.nav-item i    { font-size: 22px; color: var(--border); }
.nav-item span { font-size: 10px; color: var(--gray); font-weight: 600; }
.nav-item.active i, .nav-item.active span { color: var(--navy); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gray-dk);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--cream);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px; color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  background: var(--white);
}
.form-group textarea { resize: none; height: 75px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Buttons ── */
.btn { display: block; width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm); font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.btn-primary   { background: var(--navy); color: var(--white); }
.btn-danger    { background: var(--red);  color: var(--white); }
.btn-secondary { background: var(--navy-xlt); color: #185FA5; font-size: 13px; padding: 11px; }
.btn:active { opacity: 0.85; transform: scale(0.99); }

/* ── Attendee list ── */
.attendee {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 0.5px solid #F1EFE8;
}
.attendee:last-child { border-bottom: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy-xlt);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #185FA5;
  flex-shrink: 0;
}
.attendee-info { flex: 1; }
.attendee-info h4 { font-size: 13px; font-weight: 600; color: var(--text); }
.attendee-info p  { font-size: 11px; color: var(--gray); }

/* ── Detail info rows ── */
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid #F1EFE8;
}
.info-row:last-child { border-bottom: none; }
.info-row .key { font-size: 13px; color: var(--gray); display: flex; align-items: center; gap: 6px; }
.info-row .val { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Detail header ── */
.detail-header {
  background: var(--navy);
  padding: 14px 20px 20px;
}
.detail-header h2 { color: var(--white); font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.detail-header p  { color: var(--navy-lt); font-size: 13px; }
.detail-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── Alerts ── */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.alert-success { background: var(--green-bg); color: var(--green-tx); }
.alert-error   { background: #FDECEA; color: #B71C1C; }

/* ── Login ── */
.login-wrap {
  min-height: 100dvh;
  background: var(--navy);
  display: flex; flex-direction: column;
  max-width: 480px; margin: 0 auto;
}
.login-top { padding: 60px 28px 32px; }
.login-logo {
  width: 58px; height: 58px;
  background: rgba(255,255,255,0.12);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--white);
  margin-bottom: 24px;
}
.login-top h1 { color: var(--white); font-size: 26px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.login-top p  { color: #7DB4D8; font-size: 14px; }
.login-form {
  background: var(--cream);
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 40px;
  flex: 1;
  display: flex; flex-direction: column; gap: 16px;
}
.login-form h2 { font-size: 20px; font-weight: 700; color: var(--navy); }
.login-form .hint { font-size: 13px; color: var(--gray); }

/* ── Empty state ── */
.empty { text-align: center; padding: 40px 20px; color: var(--gray); }
.empty i { font-size: 40px; margin-bottom: 12px; display: block; }
.empty p { font-size: 14px; }

/* ── Utilities ── */
.text-muted { color: var(--gray); }
.text-sm    { font-size: 13px; }
.mt-1 { margin-top: 6px; }
.gap-8 { gap: 8px; }
.flex-center { display: flex; align-items: center; }
