/* ============================================
   ROCOHEALTH PWA - COMPLETE DESIGN SYSTEM
   Modern, vibrant, and premium healthcare app
   ============================================ */

/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;500;600;700;800&display=swap');

/* === CSS CUSTOM PROPERTIES === */
:root {
  --primary-dark: #0f172a;
  --primary-blue: #1e3a5f;
  --accent-blue: #3b82f6;
  --accent-orange: #f97316;
  --accent-yellow: #fbbf24;
  --accent-green: #22c55e;
  --accent-pink: #ec4899;
  --accent-purple: #8b5cf6;
  --text-white: #ffffff;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --card-bg: rgba(30, 58, 95, 0.6);
  --card-bg-light: rgba(255, 255, 255, 0.95);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 50px;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: 'Fredoka', sans-serif;
  --font-primary: 'Nunito', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  color: var(--text-white);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

/* === LAYOUT === */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* === LOGIN BACKGROUND === */
.login-background {
  background: radial-gradient(circle at top left, #3b82f6 0%, transparent 40%),
    radial-gradient(circle at bottom right, #8b5cf6 0%, transparent 40%),
    radial-gradient(circle at center, #1e3a5f 0%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.login-background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* === ROCO ACTIONS === */
.roco-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.roco-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.roco-action-btn:hover {
  background: white;
  color: var(--primary-blue);
  transform: translateY(-2px);
}


/* === DASHBOARD HEADER === */
.dashboard-header {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  gap: 16px;
}

.user-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 3px solid var(--accent-blue);
}

.user-info {
  flex: 1;
}

.user-greeting {
  font-size: 14px;
  color: var(--text-muted);
}

.user-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}

.points-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  border-radius: var(--radius-full);
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.notification-btn {
  width: 44px;
  height: 44px;
  background: var(--card-bg);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 20px;
  cursor: pointer;
  position: relative;
}

.notification-btn::after {
  content: '🔔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* === MEDICATION CARD === */
.medication-card {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  color: var(--text-white);
}

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

.med-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent-orange);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.med-time {
  font-size: 14px;
  color: var(--accent-yellow);
  font-weight: 600;
}

.med-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.med-dose {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.med-instructions {
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.med-actions {
  display: flex;
  gap: 12px;
}

/* === QUICK ACTIONS === */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  color: white;
}

.quick-action:hover {
  transform: translateY(-4px);
  background: rgba(59, 130, 246, 0.3);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.quick-action-icon.diet {
  background: linear-gradient(135deg, var(--accent-green), #16a34a);
}

.quick-action-icon.calendar {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
}

.quick-action-icon.games {
  background: linear-gradient(135deg, var(--accent-orange), #ea580c);
}

.quick-action-icon.medical {
  background: linear-gradient(135deg, var(--accent-purple), #7c3aed);
}

.quick-action-label {
  font-size: 12px;
  font-weight: 600;
}

/* === TASKS / METAS === */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.section-link {
  font-size: 14px;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.task-item:hover {
  background: rgba(59, 130, 246, 0.2);
}

.task-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent-blue);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.task-item.completed .task-checkbox {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

.task-item.completed .task-checkbox::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.task-content {
  flex: 1;
}

.task-title {
  font-weight: 600;
  font-size: 15px;
}

.task-item.completed .task-title {
  text-decoration: line-through;
  opacity: 0.6;
}

.task-time {
  font-size: 12px;
  color: var(--text-muted);
}

.task-points {
  padding: 6px 12px;
  background: rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-yellow);
}

/* === CARDS (General) === */
.card-menu {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  text-decoration: none;
}

.card-urgent {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* === SHOP SCREEN === */
.shop-header {
  text-align: center;
  padding: 20px 24px;
}

.shop-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.balance-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  border-radius: var(--radius-full);
  margin: 16px auto;
  width: fit-content;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.character-dresser {
  position: relative;
  height: 280px;
  background: linear-gradient(180deg, #4a90c2 0%, #2d6a9f 100%);
  border-radius: var(--radius-lg);
  margin: 0 24px 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-display {
  position: relative;
  z-index: 1;
  text-align: center;
}

.category-tabs {
  display: flex;
  gap: 8px;
  padding: 0 24px;
  overflow-x: auto;
  margin-bottom: 20px;
}

.category-tab {
  padding: 10px 20px;
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.category-tab.active {
  background: var(--accent-blue);
  color: white;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 0 24px;
}

.shop-item {
  background: var(--card-bg-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  color: var(--primary-dark);
}

.shop-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.shop-item-image {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.shop-item-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.shop-item-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  border-radius: var(--radius-full);
  color: white;
  font-weight: 700;
  font-size: 14px;
}

.shop-item.owned .shop-item-price {
  background: linear-gradient(135deg, var(--accent-green), #16a34a);
}

.item-favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 18px;
  cursor: pointer;
}

/* === LEADERBOARD SCREEN === */
.leaderboard-header {
  text-align: center;
  padding: 20px 24px;
}

.leaderboard-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
}

.leaderboard-tabs {
  display: flex;
  background: var(--card-bg);
  border-radius: var(--radius-full);
  padding: 4px;
  margin: 16px 24px;
}

.lb-tab {
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.lb-tab.active {
  background: var(--accent-blue);
  color: white;
}

.position-banner {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 0 24px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.position-number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-dark);
}

.position-text {
  font-size: 14px;
  color: var(--primary-dark);
  font-weight: 600;
}

.countdown-badge {
  margin-left: auto;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--primary-dark);
  font-weight: 600;
}

.podium-container {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
}

.podium-avatar {
  width: 60px;
  height: 60px;
  background: var(--card-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 8px;
  border: 3px solid var(--accent-blue);
}

.podium-item.first .podium-avatar {
  width: 80px;
  height: 80px;
  font-size: 40px;
  border-color: var(--accent-yellow);
}

.podium-name {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.podium-points {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.podium-stand {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  border-radius: 12px 12px 0 0;
}

.podium-item.second .podium-stand {
  height: 80px;
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.podium-item.first .podium-stand {
  height: 110px;
  background: linear-gradient(180deg, var(--accent-blue), #2563eb);
}

.podium-item.third .podium-stand {
  height: 60px;
  background: linear-gradient(180deg, var(--accent-orange), #ea580c);
}

.leaderboard-list {
  padding: 0 24px;
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.lb-item.current-user {
  background: rgba(59, 130, 246, 0.3);
  border: 1px solid var(--accent-blue);
}

.lb-rank {
  width: 30px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}

.lb-avatar {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.lb-info {
  flex: 1;
}

.lb-name {
  font-weight: 600;
  font-size: 15px;
}

.lb-points {
  font-size: 12px;
  color: var(--text-muted);
}

/* === PROFILE SCREEN === */
.profile-header {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  padding: 40px 24px;
  text-align: center;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 20px 24px;
  margin-top: -30px;
}

.profile-stat {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.profile-stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-blue);
}

.profile-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.profile-menu {
  padding: 0 24px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  background: rgba(59, 130, 246, 0.2);
}

.menu-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.menu-text {
  flex: 1;
  font-weight: 600;
}

.menu-arrow {
  color: var(--text-muted);
}

.menu-item.danger {
  background: rgba(239, 68, 68, 0.2);
}

.menu-item.danger .menu-icon {
  background: rgba(239, 68, 68, 0.3);
}

.menu-item.danger .menu-text {
  color: #ef4444;
}

/* === BOTTOM NAV === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 480px) {
  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.nav-item.active {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.15);
}

.nav-icon {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

/* === UTILITY CLASSES === */
.dashboard-content {
  padding: 0 24px;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green), #16a34a);
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  padding: 10px 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* === FORMS & INPUTS (Duolingo Style) === */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  background: var(--card-bg);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: white;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 600;
  transition: var(--transition-smooth);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* === BUTTONS (Duolingo Style) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  letter-spacing: 0.5px;
  position: relative;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(0);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 4px 0 #1e40af;
}

.btn-primary:active {
  box-shadow: 0 0 0 #1e40af;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-light);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:active {
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.3);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-google {
  background: white;
  color: #333;
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-apple {
  background: black;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* === CARD CONTAINERS === */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-soft);
}

/* === ADMIN LINK === */
.admin-trigger {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  text-align: center;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.admin-trigger:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.1);
}

/* ============================================
   HOME REDESIGN — ROCO CARD, ACTIONS, DIARY
   ============================================ */

/* === TOP BAR V2 === */
.top-bar {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.top-bar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-blue);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}

.top-bar-info {
  flex: 1;
}

.top-bar-greeting {
  font-size: 13px;
  color: var(--text-muted);
}

.top-bar-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-white);
}

.top-bar-actions {
  display: flex;
  gap: 8px;
}

.top-bar-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  position: relative;
}

.top-bar-btn:hover {
  background: rgba(59, 130, 246, 0.4);
  transform: scale(1.05);
}

.top-bar-btn .notif-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 8px;
  border: 2px solid var(--primary-dark);
}

/* === ROCO CHARACTER CARD === */
.roco-card {
  background: var(--card-bg-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 0 20px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  min-height: 140px;
}

.roco-mascot {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  object-fit: contain;
}

.roco-dialog-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.roco-bubble {
  background: #f0f4ff;
  border-radius: 16px 16px 16px 4px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.4;
  position: relative;
  animation: bubbleFadeIn 0.3s ease;
}

@keyframes bubbleFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.roco-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  bottom: 10px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid #f0f4ff;
}

.roco-nav {
  display: flex;
  gap: 8px;
  align-self: flex-end;
}

.roco-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: white;
  color: #475569;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.roco-nav-btn:hover {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
}

.roco-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.roco-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.2s;
}

.roco-dot.active {
  background: var(--accent-blue);
  width: 18px;
  border-radius: 4px;
}

/* === ACTION GRID === */
/* === ACTION GRID === */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 20px 16px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: white;
  font-weight: 700;
  font-size: 11px;
  font-family: var(--font-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.action-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.4);
}

.action-btn .action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.action-btn.escuela {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.action-btn.rehab {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
}

/* Updated Meds Button for High Contrast */
.action-btn.meds {
  background: linear-gradient(135deg, #ff006e, #d9005a);
  /* Vibrant Pink-Red */
  box-shadow: 0 4px 10px rgba(255, 0, 110, 0.4);
}

.action-btn.id-serv {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.action-btn.citas {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
}

.action-btn.diet {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  /* Teal/Cyan */
  box-shadow: 0 4px 10px rgba(20, 184, 166, 0.4);
}

/* === REMINDERS SECTION === */
.reminder-card {
  background: rgba(30, 41, 59, 0.8);
  border-left: 4px solid var(--accent-blue);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left-width: 4px;
}

.reminder-card.urgent {
  border-left-color: #ef4444;
}

.reminder-card.info {
  border-left-color: #3b82f6;
}

.reminder-card.success {
  border-left-color: #22c55e;
}

.reminder-card.warning {
  border-left-color: #f59e0b;
}

.reminder-icon {
  font-size: 1.2rem;
}

.reminder-text {
  font-size: 0.9rem;
  color: #e2e8f0;
  flex: 1;
}

.reminder-time {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}


/* === EMERGENCY BUTTON V2 === */
.emergency-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 20px 20px;
  padding: 14px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: var(--radius-md);
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
  animation: pulse 2s infinite;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  width: calc(100% - 40px);
}

.emergency-btn:hover {
  transform: scale(1.02);
}

/* === METAS SECTION V2 === */
.metas-section {
  margin: 0 20px 24px;
}

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

.metas-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-white);
}

/* === SYMPTOM DIARY MODAL === */
.diary-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.diary-overlay.active {
  display: flex;
}

.diary-modal {
  background: white;
  width: 92%;
  max-width: 400px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diary-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.diary-header h3 {
  margin: 0;
  font-size: 18px;
  color: #1e293b;
}

.diary-date {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.diary-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diary-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.diary-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 14px;
  resize: vertical;
  min-height: 70px;
  transition: border-color 0.2s;
}

.diary-field textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
}

/* BEAR RATING */
.bear-rating {
  display: flex;
  gap: 6px;
}

.bear-btn {
  width: 44px;
  height: 44px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 22px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
}

.bear-btn:hover {
  transform: scale(1.1);
  border-color: var(--accent-orange);
}

.bear-btn.selected {
  opacity: 1;
  background: #fff7ed;
  border-color: var(--accent-orange);
  transform: scale(1.1);
}

.bear-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
  padding: 0 4px;
}

.diary-footer {
  padding: 12px 20px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.diary-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-family: var(--font-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.diary-btn.cancel {
  background: #f1f5f9;
  color: #64748b;
}

.diary-btn.save {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.diary-btn:hover {
  transform: translateY(-1px);
}