:root {
  --primary-100: #F3E8FF;
  --primary-300: #D8B4FE;
  --primary-500: #A855F7;
  --primary-700: #7E22CE;
  --primary-900: #581C87;
  
  --bg-color: #F8FAFC;
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-main: #1E293B;
  --text-muted: #64748B;
  
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(168, 85, 247, 0.1);
  
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'DM Serif Display', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-color);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; color: var(--primary-900); }
.section-title { margin: 2rem 0 1rem; font-size: 1.5rem; }
.view-subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 1.1rem; }

/* Utilities */
.hidden { display: none !important; }
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
}

/* Buttons */
button { font-family: inherit; cursor: pointer; border: none; outline: none; transition: all 0.2s; }
.btn-primary {
  background: var(--primary-500);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}
.btn-primary:hover { background: var(--primary-700); transform: translateY(-2px); }
.btn-secondary {
  background: var(--primary-100);
  color: var(--primary-700);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}
.btn-secondary:hover { background: var(--primary-300); }
.btn-danger {
  background: #FEE2E2;
  color: #991B1B;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.btn-danger:hover {
  background: #FCA5A5;
  transform: translateY(-2px);
}

/* Form */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--primary-900); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem; border-radius: var(--radius-md);
  border: 1px solid #CBD5E1; font-family: inherit; background: white;
}
.form-group input:focus { border-color: var(--primary-500); outline: none; }

/* Screen Management */
.screen { display: none; height: 100vh; width: 100vw; overflow: hidden; }
.screen.active { display: flex; }

/* ════════════ LOGIN SCREEN ════════════ */
#screen-login { justify-content: center; align-items: center; position: relative; background: url('../assets/wellness_bg.png') center/cover no-repeat; }
.login-bg { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; animation: float 10s infinite ease-in-out alternate; }
.orb1 { width: 300px; height: 300px; background: var(--primary-300); top: 10%; left: 20%; }
.orb2 { width: 400px; height: 400px; background: var(--primary-100); bottom: 10%; right: 10%; animation-delay: -3s; }
.orb3 { width: 250px; height: 250px; background: var(--primary-500); top: 40%; left: 60%; animation-delay: -6s; opacity: 0.3; }
@keyframes float { 0% { transform: translateY(0) scale(1); } 100% { transform: translateY(-30px) scale(1.1); } }

.login-card { width: 100%; max-width: 400px; text-align: center; margin: 1rem; }
.login-logo { font-size: 2rem; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.login-logo .logo-moon { font-size: 2.5rem; }
.login-logo .logo-text { font-family: var(--font-serif); color: var(--primary-900); }
.login-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.login-card .btn-primary { width: 100%; margin-top: 1rem; }
.login-footer { margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.login-footer a { color: var(--primary-500); text-decoration: none; }
.login-error { color: var(--error); font-size: 0.9rem; margin-top: 0.5rem; margin-bottom: 0.5rem; }

/* Login tabs */
.login-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; background: var(--primary-100); border-radius: var(--radius-full); padding: 0.3rem; }
.login-tab { flex: 1; padding: 0.5rem; border-radius: var(--radius-full); background: transparent; color: var(--primary-700); font-weight: 500; font-size: 0.95rem; transition: all 0.2s; }
.login-tab.active { background: white; color: var(--primary-900); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
#panel-login .btn-primary, #panel-register .btn-primary { width: 100%; margin-top: 0.5rem; }


/* ════════════ APP LAYOUT ════════════ */
.sidebar { width: 260px; background: white; border-right: 1px solid #E2E8F0; display: flex; flex-direction: column; z-index: 10; transition: transform 0.3s; }
.sidebar-brand { padding: 2rem 1.5rem; font-size: 1.2rem; font-family: var(--font-serif); display: flex; align-items: center; gap: 0.5rem; color: var(--primary-900); }
.sidebar-nav { flex: 1; padding: 0 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; text-decoration: none; color: var(--text-muted); border-radius: var(--radius-md); transition: all 0.2s; font-weight: 500; }
.nav-item:hover { background: var(--primary-100); color: var(--primary-700); }
.nav-item.active { background: var(--primary-500); color: white; }
.nav-icon { font-size: 1.2rem; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid #E2E8F0; }
.user-chip { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-300); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; }
.admin-av { background: var(--primary-700); }
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; color: var(--text-main); font-size: 0.95rem; }
.user-role { font-size: 0.8rem; color: var(--text-muted); }
.btn-logout { width: 100%; padding: 0.5rem; border-radius: var(--radius-md); background: #F1F5F9; color: var(--text-muted); font-weight: 500; }
.btn-logout:hover { background: #E2E8F0; color: var(--error); }

.main-content { flex: 1; position: relative; overflow-y: auto; background: url('../assets/wellness_bg.png') center/cover fixed; background-color: var(--primary-100); background-blend-mode: overlay; padding: 2rem 3rem; }
.mobile-topbar { display: none; padding: 1rem; background: white; border-bottom: 1px solid #E2E8F0; align-items: center; gap: 1rem; }
.btn-icon { background: none; font-size: 1.5rem; color: var(--text-main); }
.admin-badge { font-size: 0.7rem; background: var(--warning); color: white; padding: 0.2rem 0.5rem; border-radius: 4px; vertical-align: middle; font-family: var(--font-sans); }

/* Views */
.view { display: none; animation: fadeIn 0.3s ease; max-width: 1000px; margin: 0 auto; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Home View */
.reminder-banner { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem; margin-bottom: 1.5rem; border-left: 4px solid var(--primary-500); }
.reminder-icon { font-size: 1.5rem; }
.quote-card { text-align: center; padding: 2rem; margin-bottom: 2rem; }
.quote-text { font-family: var(--font-serif); font-size: 1.5rem; color: var(--primary-700); margin-bottom: 0.5rem; font-style: italic; }
.quote-author { color: var(--text-muted); font-size: 0.9rem; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.quick-card { background: white; padding: 1.5rem; border-radius: var(--radius-lg); text-align: center; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.quick-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: var(--primary-300); }
.qc-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.qc-label { font-weight: 500; color: var(--primary-900); }
.activity-list { display: flex; flex-direction: column; gap: 1rem; }
.activity-item { display: flex; align-items: center; gap: 1rem; background: white; padding: 1rem; border-radius: var(--radius-md); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.activity-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-100); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.activity-info { display: flex; flex-direction: column; }
.activity-name { font-weight: 500; color: var(--text-main); }
.activity-date { font-size: 0.8rem; color: var(--text-muted); }

/* Check-in View */
.checkin-card { text-align: center; padding: 3rem 2rem; }
.checkin-q { font-size: 1.2rem; margin-bottom: 2rem; color: var(--primary-900); }
.emotion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; }
.emotion-btn { background: white; border: 2px solid transparent; padding: 1.5rem 1rem; border-radius: var(--radius-lg); font-size: 1rem; color: var(--text-main); font-weight: 500; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.emotion-btn:hover { border-color: var(--primary-300); transform: scale(1.05); }
.emotion-btn span { font-size: 2rem; }
.checkin-result { padding: 2rem 0; animation: fadeIn 0.5s; }
.result-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 1rem; }
#result-emoji { font-size: 4rem; margin-bottom: 1rem; }
.result-recs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; text-align: left; }
.emotion-chart { display: flex; align-items: flex-end; justify-content: space-between; height: 200px; padding: 1rem; background: white; border-radius: var(--radius-lg); margin-top: 1rem; }
.chart-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; height: 100%; justify-content: flex-end; width: 10%; }
.chart-bar { width: 100%; background: var(--primary-300); border-radius: 8px 8px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 0.2rem; transition: height 0.5s; font-size: 1.2rem; }
.chart-empty { background: #E2E8F0; color: #94A3B8; }
.chart-day { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.chart-day-today { background: var(--primary-100); border-radius: 12px; padding: 0.2rem; width: 100%; display: flex; flex-direction: column; align-items: center; }

/* Grid Components */
.library-grid, .capsule-grid, .resources-grid, .agenda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.content-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: transform 0.2s; cursor: pointer; }
.content-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
.card-img { height: 140px; background: var(--primary-100); display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; }
.card-badge { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.9); padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; color: var(--primary-700); }
.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 0.5rem; font-family: var(--font-sans); font-weight: 600; }
.card-body p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }

/* Filters */
.filter-tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 1rem; margin-bottom: 1rem; scrollbar-width: none; }
.filter-tab { padding: 0.5rem 1rem; border-radius: var(--radius-full); background: white; border: 1px solid #E2E8F0; color: var(--text-muted); white-space: nowrap; }
.filter-tab.active { background: var(--primary-500); color: white; border-color: var(--primary-500); }

/* Capsules */
.capsule-featured { display: flex; gap: 2rem; margin-bottom: 2rem; overflow: hidden; padding: 0; }
.capsule-thumb { width: 40%; background: var(--primary-900); display: flex; align-items: center; justify-content: center; position: relative; min-height: 200px; }
.play-btn { width: 60px; height: 60px; background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 1.5rem; border: 2px solid rgba(255,255,255,0.5); cursor: pointer; transition: transform 0.2s; }
.play-btn:hover { transform: scale(1.1); background: var(--primary-500); border-color: var(--primary-500); }
.capsule-badge { position: absolute; top: 1rem; left: 1rem; background: var(--warning); color: white; padding: 0.2rem 0.8rem; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: bold; }
.capsule-info { padding: 2rem; flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.capsule-duration { color: var(--primary-500); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }

/* My Space */
.myspace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.journal-textarea { width: 100%; height: 120px; resize: none; margin: 1rem 0; border: 1px solid #E2E8F0; border-radius: var(--radius-md); padding: 1rem; font-family: inherit; }
.journal-textarea:focus { outline: none; border-color: var(--primary-500); }
.progress-stats { display: flex; justify-content: space-around; margin-top: 1rem; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 2.5rem; font-family: var(--font-serif); color: var(--primary-500); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.rec-list { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.rec-item { background: white; padding: 0.75rem 1rem; border-radius: var(--radius-md); font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.rec-item:hover { background: var(--primary-100); color: var(--primary-700); }

/* Admin Dashboard */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.kpi-card { display: flex; flex-direction: column; position: relative; }
.kpi-icon { font-size: 2rem; margin-bottom: 1rem; }
.kpi-data { display: flex; flex-direction: column; }
.kpi-number { font-size: 2.5rem; font-family: var(--font-serif); font-weight: bold; color: var(--primary-900); line-height: 1; }
.kpi-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.2rem; }
.kpi-trend { position: absolute; top: 1.5rem; right: 1.5rem; font-size: 0.8rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: var(--radius-full); }
.kpi-trend.up { background: #D1FAE5; color: #065F46; }
.kpi-trend.neutral { background: #F1F5F9; color: #475569; }

.charts-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.chart-container { min-height: 300px; display: flex; flex-direction: column; }
.chart-container h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.bar-chart-admin { flex: 1; display: flex; align-items: flex-end; gap: 1rem; padding-top: 2rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; justify-content: flex-end; height: 100%; }
.bar-fill { width: 100%; background: var(--primary-300); border-radius: 4px 4px 0 0; min-height: 10px; transition: height 1s; }
.bar-label { font-size: 0.8rem; color: var(--text-muted); text-align: center; }

.top-content-list { display: flex; flex-direction: column; gap: 1rem; }
.tc-item { display: flex; align-items: center; gap: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #E2E8F0; }
.tc-rank { font-weight: bold; color: var(--primary-500); width: 20px; }
.tc-info { flex: 1; display: flex; flex-direction: column; }
.tc-title { font-size: 0.9rem; font-weight: 500; }
.tc-type { font-size: 0.75rem; color: var(--text-muted); }
.tc-views { font-size: 0.8rem; font-weight: 600; }

/* Admin Workers */
.workers-toolbar { display: flex; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; }
.search-input { padding: 0.75rem 1rem; border-radius: var(--radius-full); border: 1px solid #CBD5E1; width: 300px; }
.workers-table-wrap { overflow-x: auto; padding: 0; }
.workers-table { width: 100%; border-collapse: collapse; text-align: left; }
.workers-table th { background: var(--primary-100); padding: 1rem; font-weight: 600; color: var(--primary-900); }
.workers-table td { padding: 1rem; border-bottom: 1px solid #E2E8F0; }
.status-badge { padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 600; }
.status-active { background: #D1FAE5; color: #065F46; }
.status-inactive { background: #FEE2E2; color: #991B1B; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal { width: 100%; max-width: 500px; margin: 1rem; }
.modal h3 { margin-bottom: 1.5rem; font-family: var(--font-serif); font-size: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }
.confirm-modal { max-width: 460px; text-align: left; }
.confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.5rem;
}
.confirm-icon.danger {
  background: #FEE2E2;
  color: #991B1B;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.16);
}
.confirm-modal h3 { margin-bottom: 0.75rem; color: #7F1D1D; }
.confirm-text { color: var(--text-main); line-height: 1.5; margin-bottom: 1rem; }
.confirm-impact {
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  color: #7C2D12;
}
.confirm-impact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}
.confirm-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 1rem;
}

/* Admin Config */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.config-card h3 { margin-bottom: 1.5rem; border-bottom: 1px solid #E2E8F0; padding-bottom: 0.5rem; }
.org-config-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.toggle-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid #F1F5F9; }
.toggle-info strong { display: block; color: var(--text-main); }
.toggle-info span { font-size: 0.85rem; color: var(--text-muted); }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #CBD5E1; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(16px); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { position: fixed; inset: 0; right: auto; transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .mobile-topbar { display: flex; }
  .main-content { padding: 1rem; }
  .charts-row, .myspace-grid, .config-grid { grid-template-columns: 1fr; }
  .capsule-featured { flex-direction: column; }
  .capsule-thumb { width: 100%; }
}

/* ════════════ TOAST NOTIFICATIONS ════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-900);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(88, 28, 135, 0.35);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  max-width: 380px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.toast-error { background: var(--error); box-shadow: 0 10px 40px rgba(239, 68, 68, 0.35); }

/* ════════════ LOADING STATE ════════════ */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ════════════ LOGO STYLES ════════════ */
.login-brand-logo {
  max-width: 220px;
  height: auto;
  margin-bottom: 1rem;
}
.brand-logo {
  max-width: 160px;
  height: auto;
}
.mobile-brand-logo {
  max-width: 120px;
  height: auto;
}
.sidebar-brand {
  gap: 1rem !important;
}

/* ════════════ COMMUNICATIONS FEED ════════════ */
.comm-card {
  background: white;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary-500);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}
.comm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -3px rgba(168, 85, 247, 0.15);
}
.comm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.comm-title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary-900);
}
.comm-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.comm-body {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ════════════ EMOTION INTENSITY SELECTOR ════════════ */
.emotion-btn.selected {
  border-color: var(--selected-color, var(--primary-500)) !important;
  background: var(--primary-100) !important;
  box-shadow: 0 0 14px var(--selected-color-alpha, rgba(168, 85, 247, 0.25)) !important;
  transform: scale(1.05);
}
.emotion-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.emotion-btn:disabled:hover {
  transform: none;
  border-color: transparent;
}

.intensity-scale {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.5rem 0 0.5rem;
  flex-wrap: wrap;
}
.intensity-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid #E2E8F0;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.intensity-btn:hover {
  transform: scale(1.1);
  border-color: var(--selected-color, var(--primary-300));
}
.intensity-btn.selected {
  background: var(--selected-color, var(--primary-500)) !important;
  color: white !important;
  border-color: var(--selected-color, var(--primary-500)) !important;
  box-shadow: 0 0 10px var(--selected-color-alpha, rgba(168, 85, 247, 0.35)) !important;
}
.intensity-labels {
  display: flex;
  justify-content: space-between;
  max-width: 440px;
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

/* ════════════ LOADING SCREEN OVERLAY ════════════ */
.loading-overlay-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  background: radial-gradient(circle at 30% 20%, var(--primary-100) 0%, var(--bg-color) 70%);
}
.loading-overlay-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.spinner-ring {
  width: 50px;
  height: 50px;
  border: 4px solid var(--primary-100);
  border-top: 4px solid var(--primary-500);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loader-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.95; }
  100% { opacity: 0.6; }
}

