/* ============================================================
   TareasKids - Estilos Globales
   ============================================================ */
:root {
  --primary: #6C63FF;
  --primary-dark: #5a52d5;
  --secondary: #FF6584;
  --accent: #43C6AC;
  --yellow: #F7B731;
  --danger: #FC5C65;
  --bg: #F8F9FE;
  --card: #ffffff;
  --sidebar-bg: #1e1e2e;
  --sidebar-text: rgba(255,255,255,0.75);
  --sidebar-active: rgba(108,99,255,0.25);
  --text: #2d2d3a;
  --text-muted: #888;
  --border: rgba(0,0,0,0.07);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.25s ease;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); overflow-x: clip; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 99px; opacity: 0.5; }

/* ============================================================
   LAYOUT: Sidebar & Main Content
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: clip;
}
.sidebar {
  width: 260px;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1050;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}
.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.18);
  border-radius: 99px;
}
.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
.sidebar-logo {
  padding: 16px 14px 12px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.sidebar-logo-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.sidebar-logo-card:hover {
  transform: translateY(-2px);
}
.sidebar-logo-card img {
  height: 50px;
  max-height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.sidebar-nav {
  padding: 12px 10px;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sidebar-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.3); padding: 8px 12px 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  color: var(--sidebar-text); font-size: 0.9rem; font-weight: 500; margin-bottom: 2px;
  transition: var(--transition);
}
.sidebar-link:hover { background: rgba(255,255,255,0.07); color: #fff; }
.sidebar-link.active { background: var(--sidebar-active); color: var(--primary); color: #a89eff; }
.sidebar-link .si { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-link.danger { color: #ff6b6b; }
.sidebar-link.danger:hover { background: rgba(255,107,107,0.15); }
.sidebar-submenu-group { margin-bottom: 2px; }
.sidebar-submenu-toggle {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  user-select: none;
}
.sidebar-submenu-arrow {
  font-size: 0.72rem;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.65;
}
.sidebar-submenu-group.open .sidebar-submenu-arrow {
  transform: rotate(180deg);
}
.sidebar-submenu-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
  opacity: 0;
  padding-left: 10px;
  margin-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
}
.sidebar-submenu-group.open .sidebar-submenu-items {
  max-height: 350px;
  opacity: 1;
  margin-top: 4px;
  margin-bottom: 6px;
}
.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 0.84rem;
  font-weight: 500;
  margin-bottom: 2px;
  text-decoration: none;
  transition: var(--transition);
}
.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sidebar-sublink.active {
  background: var(--sidebar-active);
  color: #a89eff;
  font-weight: 700;
}
.sidebar-sublink .si {
  width: 18px;
  text-align: center;
  font-size: 0.88rem;
}
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  background: rgba(18, 18, 28, 0.7);
  backdrop-filter: blur(8px);
}
.sidebar-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.04);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, transform 0.2s ease;
}
.sidebar-user:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.sidebar-user .su-name {
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .su-role {
  color: #A5B4FC;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sidebar-btn-salir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(252, 92, 101, 0.12);
  color: #ff6b6b;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  flex-shrink: 0;
  border: 1px solid rgba(252, 92, 101, 0.25);
  transition: all 0.2s ease;
}
.sidebar-btn-salir:hover {
  background: #FC5C65;
  color: #ffffff;
  border-color: #FC5C65;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(252, 92, 101, 0.3);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-overlay.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  width: calc(100% - 260px);
}
.topbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1020;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.topbar-left {
  display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1;
}
.topbar-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.btn-instalar-app {
  display: none !important;
  background: linear-gradient(135deg, #6C63FF, #43C6AC) !important; color: #ffffff !important; font-weight: 800;
  border: none; border-radius: 50px; padding: 7px 16px; font-size: 0.82rem;
  align-items: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(108,99,255,0.35); transition: var(--transition);
  white-space: nowrap;
}
.btn-instalar-app.pk-visible {
  display: inline-flex !important;
}
.btn-instalar-app:hover { background: linear-gradient(135deg, #5b52f5, #38b29a) !important; transform: translateY(-1px); color: #fff !important; }
.btn-avisos {
  background: rgba(108,99,255,0.1); color: #6C63FF; font-weight: 700;
  border: none; border-radius: 50px; padding: 6px 14px; font-size: 0.82rem;
  display: inline-flex; align-items: center; gap: 6px; transition: var(--transition);
  white-space: nowrap;
}
.btn-avisos:hover { background: rgba(108,99,255,0.18); transform: translateY(-1px); }
.btn-avisos.activo {
  background: #DCFCE7 !important; color: #15803D !important; border: 1px solid #86EFAC;
}
.hamburger {
  display: none;
  background: #F0F2FA;
  border: none;
  color: var(--dark);
  font-size: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.hamburger:hover { background: #E2E8F0; color: var(--primary); }
.page-body { padding: 24px 28px; flex: 1; min-width: 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card-tk {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); overflow: hidden;
}
.card-tk .card-header-tk {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-tk .card-header-tk h5 { font-size: 1rem; font-weight: 700; margin: 0; }
.card-tk .card-body-tk { padding: 24px; }

/* Stat cards */
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--border); padding: 24px; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.stat-card.purple::before { background: var(--primary); }
.stat-card.pink::before { background: var(--secondary); }
.stat-card.green::before { background: var(--accent); }
.stat-card.yellow::before { background: var(--yellow); }
.stat-card .stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.stat-card .stat-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 2.5rem; opacity: 0.1; }

/* Avatar */
.avatar-circle {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 1rem; color: #fff; flex-shrink: 0;
}
.avatar-circle.lg { width: 60px; height: 60px; font-size: 1.4rem; }
.avatar-circle.xl { width: 80px; height: 80px; font-size: 2rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-tk {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 20px;
  border-radius: 12px; font-weight: 600; font-size: 0.9rem; border: none;
  cursor: pointer; transition: var(--transition); line-height: 1;
}
.btn-tk:active { transform: scale(0.97); }
.btn-primary-tk { background: var(--primary); color: #fff; }
.btn-primary-tk:hover { background: var(--primary-dark); }
.btn-cta-tk { 
  background: linear-gradient(135deg, #10B981, #059669); 
  color: #fff !important; 
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  text-decoration: none;
}
.btn-cta-tk:hover { 
  background: linear-gradient(135deg, #059669, #047857); 
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}
.btn-success-tk { background: var(--accent); color: #fff; }
.btn-success-tk:hover { background: #35a792; }
.btn-danger-tk { background: var(--danger); color: #fff; }
.btn-danger-tk:hover { background: #e04550; }
.btn-secondary-tk { background: rgba(108,99,255,0.1); color: var(--primary); }
.btn-secondary-tk:hover { background: rgba(108,99,255,0.2); }
.btn-outline-tk { 
  background: #ffffff; 
  color: var(--primary); 
  border: 2px solid var(--primary); 
  font-weight: 700;
  text-decoration: none;
}
.btn-outline-tk:hover { 
  background: var(--primary); 
  color: #ffffff !important; 
}
.btn-sm-tk { padding: 7px 14px; font-size: 0.82rem; border-radius: 9px; }
.btn-lg-tk { padding: 14px 32px; font-size: 1.05rem; border-radius: 14px; }

/* ============================================================
   BADGES
   ============================================================ */
.badge-tk {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: 99px; font-size: 0.75rem; font-weight: 600;
}
.badge-primary { background: rgba(108,99,255,0.12); color: var(--primary); }
.badge-success { background: rgba(67,198,172,0.12); color: #2aa88d; }
.badge-danger  { background: rgba(252,92,101,0.12); color: var(--danger); }
.badge-yellow  { background: rgba(247,183,49,0.15); color: #c89500; }
.badge-muted   { background: rgba(0,0,0,0.06); color: var(--text-muted); }
.badge-frecuencia { font-size: 0.72rem; }

/* ============================================================
   TABLES & MODERN CARD LISTS
   ============================================================ */
.table-tk { width: 100%; border-collapse: collapse; white-space: nowrap; }
.table-tk th { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 12px 16px; border-bottom: 2px solid var(--border); background: #FAFBFF; }
.table-tk td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 0.88rem; vertical-align: middle; }
.table-tk tr:last-child td { border-bottom: none; }
.table-tk tr:hover td { background: rgba(108,99,255,0.03); }

/* Parent / Family Card (Modern alternative to tables) */
.parent-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  padding: 20px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}
.parent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(108,99,255,0.1);
  border-color: rgba(108,99,255,0.3);
}
.parent-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.parent-card-user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.parent-card-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.parent-card-email {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.parent-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.parent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #F4F6FC;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4A5568;
}
.parent-chip i {
  color: var(--primary);
  font-size: 0.85rem;
}
.parent-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
  flex-wrap: wrap;
  gap: 10px;
}

/* Activity Card Padre - Ultra-Compact (2 Lines Max) */
.activity-card-compact {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
  min-height: 52px;
}
.activity-card-compact:hover {
  border-color: rgba(108,99,255,0.3);
  box-shadow: 0 3px 10px rgba(108,99,255,0.08);
}
.activity-compact-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(108,99,255,0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.activity-compact-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.activity-compact-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.2;
}
.activity-compact-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-compact-line2 {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  font-size: 0.73rem;
}
.activity-compact-assigned {
  color: #64748B;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.activity-compact-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.btn-compact-action {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-compact-action.edit {
  background: rgba(108,99,255,0.1);
  color: var(--primary);
}
.btn-compact-action.edit:hover {
  background: var(--primary);
  color: #fff;
}
.btn-compact-action.delete {
  background: rgba(252,92,101,0.1);
  color: #FC5C65;
}
.btn-compact-action.delete:hover {
  background: #FC5C65;
  color: #fff;
}
.activity-badge-gem {
  background: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Prize Card Padre - Ultra-Compact (2 Lines Max) */
.prize-card-compact {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s ease;
  min-height: 52px;
}
.prize-card-compact:hover {
  border-color: rgba(255,101,132,0.3);
  box-shadow: 0 3px 10px rgba(255,101,132,0.08);
}
.prize-compact-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
}
.prize-compact-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255,101,132,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.prize-compact-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.prize-compact-line1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  line-height: 1.2;
}
.prize-compact-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prize-compact-line2 {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  font-size: 0.73rem;
}
.prize-badge-cost {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.prize-compact-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .prize-card-compact {
    padding: 7px 8px;
    gap: 8px;
    min-height: 48px;
  }
  .prize-compact-img, .prize-compact-icon {
    width: 30px;
    height: 30px;
    font-size: 0.95rem;
  }
  .prize-compact-title {
    font-size: 0.84rem;
  }
}

/* ============================================================
   FORMS
   ============================================================ */
.form-tk .form-label { font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.form-tk .form-control, .form-tk .form-select {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 0.92rem; transition: var(--transition); width: 100%; background: #fff;
  color: var(--text);
}
.form-tk .form-control:focus, .form-tk .form-select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}
.form-tk .form-group { margin-bottom: 20px; }
.form-tk .form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.toggle-switch { display: flex; align-items: center; gap: 10px; }
.toggle-switch input[type=checkbox] { width: 44px; height: 24px; accent-color: var(--primary); cursor: pointer; }
.icon-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-option { width: 50px; height: 50px; border-radius: 10px; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; cursor: pointer; transition: var(--transition); color: var(--text-muted); }
.icon-option:hover, .icon-option.selected { border-color: var(--primary); background: rgba(108,99,255,0.08); color: var(--primary); }
.color-picker-row { display: flex; gap: 10px; flex-wrap: wrap; }
.color-option { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: var(--transition); }
.color-option:hover, .color-option.selected { border-color: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,0.2); transform: scale(1.1); }
.frecuencia-options { display: flex; flex-wrap: wrap; gap: 10px; }
.frecuencia-btn { padding: 10px 18px; border-radius: 10px; border: 2px solid var(--border); background: #fff; cursor: pointer; font-size: 0.88rem; font-weight: 600; color: var(--text-muted); transition: var(--transition); }
.frecuencia-btn:hover, .frecuencia-btn.selected { border-color: var(--primary); background: rgba(108,99,255,0.08); color: var(--primary); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6C63FF 0%, #43C6AC 100%); padding: 20px; }
.login-card { background: #fff; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); padding: 40px; width: 100%; max-width: 440px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-emoji { font-size: 3rem; display: block; margin-bottom: 8px; }
.login-logo h1 { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.login-logo h1 span { color: var(--primary); }
.login-logo p { color: var(--text-muted); font-size: 0.9rem; }
.role-tabs { display: flex; gap: 6px; background: var(--bg); padding: 5px; border-radius: 12px; margin-bottom: 28px; }
.role-tab { flex: 1; text-align: center; padding: 10px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--text-muted); border: none; background: transparent; transition: var(--transition); }
.role-tab.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ============================================================
   PIN INPUT
   ============================================================ */
.pin-container { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.pin-box {
  width: 60px; height: 70px; border: 2.5px solid var(--border); border-radius: 14px;
  text-align: center; font-size: 1.8rem; font-weight: 800; color: var(--primary);
  transition: var(--transition); background: var(--bg);
}
.pin-box:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(108,99,255,0.15); }

/* ============================================================
   HIJO PANEL
   ============================================================ */
.hijo-page { min-height: 100vh; background: linear-gradient(160deg, #6C63FF 0%, #43C6AC 100%); }
.hijo-topbar { padding: 20px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.hijo-topbar .logo-text { color: #fff; font-size: 1rem; font-weight: 700; }
.actipesos-badge { background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); border-radius: 50px; padding: 8px 16px; display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 1.1rem; }
.actipesos-badge .coin { font-size: 1.3rem; }
.hijo-content { background: #fff; border-radius: 24px 24px 0 0; margin-top: 20px; min-height: calc(100vh - 140px); padding: 24px; padding-bottom: 100px; }
.hijo-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); display: flex; z-index: 100; box-shadow: 0 -4px 20px rgba(0,0,0,0.08); }
.hijo-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: var(--transition); gap: 4px; }
.hijo-nav-item i { font-size: 1.4rem; }
.hijo-nav-item.active { color: var(--primary); }
.hijo-nav-item.active i { transform: scale(1.1); }

/* Task cards */
.task-card { border-radius: 16px; border: 2px solid var(--border); background: #fff; padding: 18px; margin-bottom: 12px; display: flex; align-items: center; gap: 16px; transition: var(--transition); }
.task-card.done { background: rgba(67,198,172,0.06); border-color: rgba(67,198,172,0.3); }
.task-card .task-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(108,99,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--primary); flex-shrink: 0; }
.task-card.done .task-icon { background: rgba(67,198,172,0.15); color: var(--accent); }
.task-card .task-info { flex: 1; }
.task-card .task-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.task-card .task-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card .task-ap { display: flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 700; color: var(--yellow); }
.complete-btn { background: linear-gradient(135deg, #43C6AC, #26de81); color: #fff; border: none; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: 0.85rem; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.complete-btn:hover { transform: scale(1.04); box-shadow: 0 4px 12px rgba(67,198,172,0.4); }
.done-badge { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 0.88rem; }

/* Progress bar */
.progress-bar-tk { height: 10px; background: rgba(0,0,0,0.06); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 99px; transition: width 0.6s ease; }

/* Prize cards */
.prize-card { border-radius: 16px; border: 2px solid var(--border); background: #fff; overflow: hidden; transition: var(--transition); }
.prize-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,99,255,0.15); }
.prize-card .prize-img { height: 140px; background: rgba(108,99,255,0.06); display: flex; align-items: center; justify-content: center; font-size: 3rem; overflow: hidden; }
.prize-card .prize-img img { width: 100%; height: 100%; object-fit: cover; }
.prize-card .prize-body { padding: 16px; }
.prize-card .prize-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.prize-card .prize-cost { display: flex; align-items: center; gap: 5px; font-weight: 800; color: var(--yellow); font-size: 1.1rem; margin-bottom: 12px; }
.btn-canjear { width: 100%; padding: 11px; border-radius: 10px; border: none; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-canjear:hover { opacity: 0.9; transform: scale(1.02); }
.btn-canjear:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; transform: none; }

/* ============================================================
   CELEBRATION OVERLAY
   ============================================================ */
#celebration-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}
#celebration-overlay.show {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
}
#celebration-overlay.fade-out {
  opacity: 0 !important;
  pointer-events: none;
}
.celebration-emoji { font-size: 5rem; animation: bounce 1s infinite; display: block; margin-bottom: 16px; }
.celebration-title { font-size: 3rem; font-weight: 900; color: #fff; text-shadow: 2px 2px 20px rgba(0,0,0,0.3); margin-bottom: 8px; }
.celebration-sub { font-size: 1.4rem; color: rgba(255,255,255,0.9); margin-bottom: 8px; }
.celebration-msg { font-size: 1.1rem; color: rgba(255,255,255,0.75); margin-bottom: 28px; }
#confetti-canvas { position: absolute; inset: 0; pointer-events: none; }

/* ============================================================
   TOAST NOTIFICATIONS (Con soporte Swipe y Botón X)
   ============================================================ */
.toast-container-tk {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .toast-container-tk {
    top: 12px;
    left: 12px;
    right: 12px;
    align-items: center;
  }
}

.toast-tk {
  min-width: 260px;
  max-width: 390px;
  padding: 12px 14px 12px 16px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25), 0 2px 8px rgba(0, 0, 0, 0.12);
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.toast-tk:active {
  cursor: grabbing;
}

@media (max-width: 767.98px) {
  .toast-tk {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    font-size: 0.88rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
  }
}

.toast-tk .toast-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.toast-tk .toast-msg {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  word-break: break-word;
}

.toast-tk .toast-close-btn {
  background: rgba(0, 0, 0, 0.15);
  border: none;
  color: rgba(255, 255, 255, 0.9);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  margin-left: 6px;
  transition: all 0.15s ease;
}

.toast-tk .toast-close-btn:hover {
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  transform: scale(1.1);
}

.toast-tk.success { background: linear-gradient(135deg, #10B981, #059669); }
.toast-tk.error   { background: linear-gradient(135deg, #EF4444, #DC2626); }
.toast-tk.info    { background: linear-gradient(135deg, #6C63FF, #4F46E5); }
.toast-tk.warning { background: linear-gradient(135deg, #F59E0B, #D97706); }
.toast-tk.notif   { background: linear-gradient(135deg, #3B82F6, #2563EB); }

@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast-tk.clickable {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.2s ease, opacity 0.25s ease;
}
.toast-tk.clickable:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.35);
}
.toast-tk .toast-action-hint {
  font-size: 0.76rem;
  opacity: 0.92;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   CENTRO DE NOTIFICACIONES (Campanita Dropdown / Drawer)
   ============================================================ */
.notif-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.btn-bell-notif {
  position: relative;
  background: rgba(108,99,255,0.1) !important;
  color: #6C63FF !important;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  cursor: pointer;
}
.btn-bell-notif:hover {
  background: rgba(108,99,255,0.18) !important;
  transform: translateY(-1px);
}
.btn-bell-notif.activo {
  background: #DCFCE7 !important;
  color: #15803D !important;
  border: 1px solid #86EFAC;
}
.badge-notif-count {
  background: #EF4444;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50px;
  padding: 1px 6px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  top: -4px;
  right: -4px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  animation: notifPulse 2s infinite ease-in-out;
}
@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.notif-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9990;
}
.notif-backdrop.show {
  display: block;
}
body.notif-menu-open .topbar,
.topbar.notif-open,
body.notif-menu-open .hijo-hero-topbar,
.hijo-hero-topbar.notif-open {
  z-index: 9992 !important;
}
.notif-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: 92vw;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #E2E8F0;
  z-index: 9995;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: notifSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.notif-dropdown-menu.open {
  display: flex;
}
@keyframes notifSlideDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #F1F5F9;
  background: #FAF5FF;
}
.badge-notif-pill {
  font-size: 0.68rem;
  font-weight: 800;
  background: #6C63FF;
  color: #fff;
  padding: 2px 8px;
  border-radius: 50px;
}
.btn-notif-action {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6C63FF;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}
.btn-notif-action:hover {
  background: rgba(108, 99, 255, 0.1);
  color: #4F46E5;
}
.notif-tabs {
  display: flex;
  background: #F8FAFC;
  padding: 4px;
  border-bottom: 1px solid #E2E8F0;
  gap: 4px;
}
.notif-tab {
  flex: 1;
  padding: 7px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.notif-tab:hover {
  color: #334155;
  background: rgba(255, 255, 255, 0.6);
}
.notif-tab.active {
  background: #FFFFFF;
  color: #6C63FF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.badge-tab-count {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 50px;
  background: #E2E8F0;
  color: #475569;
}
.notif-tab.active .badge-tab-count {
  background: #EDE9FE;
  color: #6C63FF;
}
.notif-permiso-banner {
  padding: 10px 14px;
  background: linear-gradient(135deg, #EEF2FF, #E0E7FF);
  border-bottom: 1px solid #C7D2FE;
}
.notif-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
  -webkit-overflow-scrolling: touch;
}
.notif-item {
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-bottom: 1px solid #F1F5F9;
  text-decoration: none !important;
  color: #1E293B !important;
  transition: background 0.15s ease;
  cursor: pointer;
}
.notif-item:hover {
  background: #F8FAFC;
}
.notif-item.unread {
  background: #F5F3FF;
  border-left: 3.5px solid #6C63FF;
}
.notif-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: #EDE9FE;
  color: #6C63FF;
}
.notif-item-icon.success { background: #DCFCE7; color: #15803D; }
.notif-item-icon.warning { background: #FEF3C7; color: #D97706; }
.notif-item-icon.danger  { background: #FEE2E2; color: #DC2626; }
.notif-item-icon.info    { background: #EDE9FE; color: #6C63FF; }
.notif-item-content {
  flex: 1;
  min-width: 0;
}
.notif-item-title {
  font-weight: 800;
  font-size: 0.85rem;
  color: #0F172A;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.notif-item-time {
  font-size: 0.72rem;
  font-weight: 500;
  color: #94A3B8;
  white-space: nowrap;
}
.notif-item-msg {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.35;
  word-break: break-word;
}
.notif-empty, .notif-loading {
  padding: 36px 20px;
  text-align: center;
  color: #64748B;
  font-size: 0.88rem;
}
.notif-empty i, .notif-loading i {
  font-size: 2rem;
  color: #CBD5E1;
  margin-bottom: 8px;
  display: block;
}

/* Mobile full-width dropdown/drawer */
@media (max-width: 767.98px) {
  .notif-dropdown-menu {
    position: fixed;
    top: 56px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 76px);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.35);
  }
  .notif-list {
    max-height: calc(100vh - 180px);
  }
}

/* ============================================================
   HIJO LOGIN - Selector de hijo
   ============================================================ */
.hijo-selector { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0; }
.hijo-card-login { border: 3px solid var(--border); border-radius: 16px; padding: 16px 20px; cursor: pointer; text-align: center; transition: var(--transition); min-width: 120px; }
.hijo-card-login:hover { border-color: var(--primary); background: rgba(108,99,255,0.05); }
.hijo-card-login.selected { border-color: var(--primary); background: rgba(108,99,255,0.08); }
.hijo-card-login .hc-name { font-weight: 700; font-size: 0.9rem; margin-top: 8px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn    { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform: translateY(0); } }
@keyframes slideUp   { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
@keyframes bounce    { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
@keyframes pulse     { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
@keyframes slideInRight { from { opacity:0; transform: translateX(30px); } to { opacity:1; transform:translateX(0); } }
@keyframes shake     { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-8px)} 40%,80%{transform:translateX(8px)} }
@keyframes counterPop { 0%{transform:scale(1)} 50%{transform:scale(1.3)} 100%{transform:scale(1)} }
.fade-in { animation: fadeIn 0.4s ease both; }
.slide-up { animation: slideUp 0.4s ease both; }
.shake { animation: shake 0.5s ease; }
.counter-pop { animation: counterPop 0.4s ease; }

/* ============================================================
   RESPONSIVE (Mobile & Tablet <= 992px)
   ============================================================ */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%) !important;
    box-shadow: 10px 0 35px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.open {
    transform: translateX(0) !important;
    z-index: 1050 !important;
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0;
  }
  .hamburger {
    display: inline-flex !important;
  }
  .topbar {
    padding: 0 16px;
    height: 58px;
    gap: 10px;
  }
  .topbar-left {
    gap: 10px;
  }
  .topbar-title {
    font-size: 1rem;
  }
  .page-body {
    padding: 16px 14px;
  }

  /* Stat cards on mobile */
  .stat-card {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .stat-card .stat-value {
    font-size: 1.6rem;
    margin-bottom: 2px;
  }
  .stat-card .stat-label {
    font-size: 0.76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .stat-card .stat-icon {
    font-size: 1.6rem;
    right: 12px;
    opacity: 0.08;
  }

  /* Cards on mobile */
  .card-tk {
    border-radius: 16px;
  }
  .card-tk .card-header-tk {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .card-tk .card-header-tk h5 {
    font-size: 0.95rem;
  }
  .card-tk .card-body-tk {
    padding: 16px;
  }
  .card-header-tk .d-flex {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px !important;
  }
  .card-header-tk input#searchInput {
    width: 100% !important;
  }
}

@media (max-width: 680px) {
  .topbar {
    padding: 0 12px;
    height: 54px;
    gap: 8px;
  }
  .topbar-left {
    gap: 8px;
  }
  .topbar-title {
    font-size: 0.92rem;
  }
  .hamburger {
    width: 34px;
    height: 34px;
    font-size: 1rem;
    flex-shrink: 0;
  }
  .topbar-actions {
    gap: 6px;
  }
  .btn-instalar-app.pk-visible, .btn-avisos {
    display: inline-flex !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
    align-items: center !important;
    font-size: 0.95rem !important;
    flex-shrink: 0 !important;
    gap: 0 !important;
  }
  .btn-instalar-app .btn-text, .btn-avisos .btn-text {
    display: none !important;
  }
  .btn-instalar-app i, .btn-avisos i {
    margin: 0 !important;
  }
}

@media (max-width: 576px) {
  .stat-card {
    padding: 14px 12px;
  }
  .stat-card .stat-value {
    font-size: 1.45rem;
  }
  .stat-card .stat-label {
    font-size: 0.72rem;
  }
  .stat-card .stat-icon {
    display: none;
  }
  .btn-tk {
    padding: 8px 14px;
    font-size: 0.84rem;
  }
}

/* ============================================================
   PWA CUSTOM INSTALL BANNER & FLOATING BAR
   ============================================================ */
.pwa-custom-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  width: calc(100% - 28px);
  max-width: 460px;
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 22px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99990;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.pwa-custom-banner.show {
  transform: translateX(-50%) translateY(0);
}
.pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(108, 99, 255, 0.25);
  border: 1.5px solid #EDE9FE;
}
.pwa-banner-info {
  flex: 1;
  min-width: 0;
}
.pwa-banner-title {
  font-weight: 800;
  font-size: 0.94rem;
  color: #0F172A;
  margin: 0;
  line-height: 1.25;
}
.pwa-banner-subtitle {
  font-size: 0.76rem;
  color: #64748B;
  margin: 0;
  line-height: 1.3;
  margin-top: 2px;
}
.pwa-btn-install {
  background: linear-gradient(135deg, #6C63FF, #43C6AC);
  color: #ffffff !important;
  border: none;
  font-weight: 800;
  font-size: 0.84rem;
  border-radius: 50px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.pwa-btn-install:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(108, 99, 255, 0.45);
}
.pwa-btn-close {
  background: #F1F5F9;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.2s;
}
.pwa-btn-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.pwa-floating-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99980;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #6C63FF !important;
  border: 1.5px solid rgba(108, 99, 255, 0.35);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.pwa-floating-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(108, 99, 255, 0.3);
  background: #ffffff;
  border-color: #6C63FF;
}
@media (max-width: 576px) {
  .pwa-floating-btn {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}

/* ============================================================
   ANIMATED SPLASH SCREEN (PWA / APP LAUNCH)
   ============================================================ */
.pk-splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: linear-gradient(135deg, #6C63FF 0%, #3B3486 50%, #1E1B4B 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  touch-action: none;
}
.pk-splash-overlay.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}
.pk-splash-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(67, 198, 172, 0.5) 0%, rgba(108, 99, 255, 0.35) 50%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: splashPulse 2.5s ease-in-out infinite alternate;
  pointer-events: none;
}
.pk-splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}
.pk-splash-icon-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splashPopIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.pk-splash-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.4));
}
.pk-splash-title {
  font-size: 2.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin: 0 0 6px 0;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: splashSlideUp 0.7s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pk-splash-title span {
  color: #43C6AC;
}
.pk-splash-slogan {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 28px 0;
  line-height: 1.4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: splashSlideUp 0.7s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pk-splash-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 1.5rem;
  animation: sparkleFloat 2.2s ease-in-out infinite alternate;
}
.pk-splash-loader {
  width: 160px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  overflow: hidden;
  position: relative;
  animation: splashSlideUp 0.7s 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pk-splash-loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #43C6AC, #F7B731, #FF6584);
  border-radius: 50px;
  animation: splashLoadProgress 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes splashPopIn {
  0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
  70% { transform: scale(1.1) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes splashSlideUp {
  0% { opacity: 0; transform: translateY(18px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes splashPulse {
  0% { transform: scale(0.85); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 0.9; }
}
@keyframes sparkleFloat {
  0% { transform: translateY(0) scale(0.85) rotate(0deg); opacity: 0.5; }
  100% { transform: translateY(-12px) scale(1.15) rotate(18deg); opacity: 1; }
}
@keyframes splashLoadProgress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* ============================================================
   SWEETALERT2 - PREMIAKIDS THEME
   ============================================================ */
div.swal2-container {
  z-index: 10000 !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  backdrop-filter: blur(4px);
}
div.swal2-popup {
  border-radius: 26px !important;
  padding: 28px 24px !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18) !important;
  border: 1.5px solid rgba(226, 232, 240, 0.8) !important;
}
div.swal2-title {
  font-size: 1.35rem !important;
  font-weight: 900 !important;
  color: #0F172A !important;
  padding-top: 10px !important;
}
div.swal2-html-container {
  font-size: 0.95rem !important;
  color: #64748B !important;
  line-height: 1.5 !important;
  margin: 12px 10px 0 !important;
}
button.swal2-confirm {
  border-radius: 50px !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  padding: 12px 26px !important;
  box-shadow: 0 4px 14px rgba(108, 99, 255, 0.3) !important;
}
button.swal2-cancel {
  border-radius: 50px !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  padding: 12px 24px !important;
}
div.swal2-icon {
  margin-top: 6px !important;
  margin-bottom: 12px !important;
}
