/* ============================================================
   EduNexus — Sistema de Diseño Principal
   ============================================================ */

/* VARIABLES */
:root {
  --color-primary: #4A7C92;
  --color-primary-dark: #3F6372;
  --color-primary-light: #7199AC;
  --color-secondary: #FFD20D;
  --color-secondary-dark: #e6bc0c;
  --color-accent: #FFD20D;

  --color-success: #10b981;
  --color-warning: #F59E0B;
  --color-danger: #ef4444;
  --color-info: #2563eb;
  --color-neutral: #6b7280;

  --bg-app: linear-gradient(135deg, #7199AC 0%, #4A7C92 100%);
  --bg-card: rgba(255, 255, 255, 0.98);
  --bg-sidebar: #3F6372;
  --bg-topbar: rgba(74, 124, 146, 0.8);

  --text-primary: #ffffff; /* Default for dark backgrounds (body/sidebar) */
  --text-on-card: #1A202C; /* Critical inversion for light cards */
  --text-secondary: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-white: #ffffff;
  
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: 12px; /* Smoother for light theme */

  --border-color: rgba(0, 0, 0, 0.08); /* Darker border for light theme visibility */
  --border-radius: 24px;
  --border-radius-sm: 12px;
  --border-radius-lg: 32px;

  --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --transition: 0.2s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  background: var(--bg-app);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.app-section {
  display: flex;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}

.page-content {
  padding: 24px;
  flex: 1;
  max-width: 1400px;
}

/* ─────────────────────────────────────────
   TOPBAR
───────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-menu {
  display: none;
  font-size: 1.1rem;
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}
.topbar-menu:hover { background: var(--bg-app); color: var(--text-primary); }

.topbar-title {
  flex: 1;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

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

.btn-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 1rem;
}
.btn-icon:hover { background: var(--bg-app); color: var(--text-primary); }

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  transition: transform var(--transition);
}

.sidebar-header {
  padding: 20px 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-school { flex: 1; min-width: 0; }
.sidebar-school-name {
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-user-role {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  margin-top: 2px;
}

.sidebar-close {
  display: none;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  padding: 4px;
}

.sidebar-user {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: var(--color-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name {
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: capitalize;
}
.user-email {
  color: rgba(255,255,255,0.55);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}
.sidebar-link.active {
  background: rgba(0, 122, 255, 0.15);
  color: var(--color-secondary);
  font-weight: 600;
  border-left: none;
  border-radius: 10px;
  margin-left: 0;
  padding-left: 12px;
}
.sidebar-link.active i { color: var(--color-secondary); }
.sidebar-link i { width: 18px; text-align: center; font-size: 0.9rem; transition: color 0.2s ease; }

.sidebar-separator {
  padding: 12px 12px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
}

.sidebar-badge {
  margin-left: auto;
  background: var(--color-danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logout {
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  border-radius: 10px;
  transition: var(--transition);
}
.sidebar-logout:hover { background: rgba(220,38,38,0.2); color: #fca5a5; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 190;
}

/* ─────────────────────────────────────────
   CARDS
───────────────────────────────────────── */
/* 🏛️ REGLAS DE CONTRASTE UNIVERSAL v9.7.10 🏛️ */
.card, 
.stat-card, 
.announcement-card, 
#report-content, 
.base-card-nexus,
.activity-card-premium,
.quick-action-btn,
.expediente-container,
.student-card,
.modal-content,
.modal-container,
.premium-card-hive,
.register-payment-card {
  --text-primary: #1A202C !important;
  --text-secondary: #4A5568 !important;
  --text-muted: #64748b !important;
  color: var(--text-primary) !important;
}

/* Selector Universal de Seguridad: Excluye botones, badges e íconos */
.card *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.stat-card *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.announcement-card *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
#report-content *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.base-card-nexus *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.activity-card-premium *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.student-card *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.modal-content *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.modal-container *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.premium-card-hive *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input),
.register-payment-card *:not(.badge):not(.badge *):not(.btn):not(.btn *):not(i):not(select):not(input) { 
  color: inherit !important; 
}

.card h1, .card h2, .card h3, .card h4, .card-title, .card strong, .card b,
.stat-card strong, .announcement-card strong, #report-content strong { 
  color: var(--text-primary) !important; 
}

.card p, .card span:not(.badge):not(.badge *):not(.btn):not(.btn *), .card div, .card-subtitle, .card label,
.announcement-card p, .announcement-card span:not(.badge):not(.btn), 
#report-content p, #report-content span:not(.badge):not(.btn), #report-content td { 
  color: var(--text-secondary) !important;
}

.card-title { color: var(--color-primary) !important; font-size: 1.1rem; }

.card-sm { padding: 16px; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* STAT CARDS */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary) !important;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary); 
  margin-top: 4px;
}
.stat-delta {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}
.stat-delta.up { color: var(--color-success); }
.stat-delta.down { color: var(--color-danger); }

/* GRID LAYOUTS */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--border-radius); /* Use 24px from variables */
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  min-height: 48px;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  background: var(--color-secondary);
  color: #1A202C !important;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 210, 13, 0.3);
  font-weight: 700;
}
.btn-primary:hover { 
  background: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 210, 13, 0.4);
}

.btn-secondary {
  background: var(--color-secondary);
  color: white;
}
.btn-secondary:hover { background: var(--color-secondary-dark); }

.btn-success {
  background: var(--color-success);
  color: white;
}
.btn-success:hover { background: #15803d; }

.btn-danger {
  background: var(--color-danger);
  color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-warning {
  background: var(--color-warning);
  color: white;
}
.btn-warning:hover { background: #b45309; }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); background: #eff6ff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-app); color: var(--text-primary); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-xs { padding: 4px 10px; font-size: 0.75rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon-only { padding: 8px; border-radius: 8px; }

/* ─────────────────────────────────────────
   FORMS
───────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1A202C !important;
  margin-bottom: 6px;
}
.form-group label i {
  margin-right: 6px;
  color: var(--text-muted);
  width: 14px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  color: #1A202C !important;
  background: #fdfdfd;
  transition: all 0.25s ease;
  outline: none;
  min-height: 48px;
}
.form-control:hover {
  border-color: #cbd5e1;
}
.form-control:focus {
  border-color: var(--color-primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(30,58,95,0.1);
  transform: translateY(-1px);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--bg-app); color: var(--text-muted); cursor: not-allowed; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { 
  cursor: pointer; 
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

/* CHIPS SELECTOR */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.chip-btn {
  padding: 8px 16px;
  background: white;
  border: 1.5px solid var(--border-color);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}
.chip-btn:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary-light);
  background: #f0f9ff;
  transform: translateY(-1px);
}
.chip-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(30,58,95,0.2);
}

.input-password { position: relative; }
.input-password input { padding-right: 44px; }
.input-password button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  padding: 4px;
}
.input-password button:hover { color: var(--text-primary); }

.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.78rem; color: var(--color-danger); margin-top: 4px; }


/* ─────────────────────────────────────────
   TABLES
───────────────────────────────────────── */
.card-table-wrapper {
  background: #ffffff;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow);
  padding: 16px; /* standard p-4 */
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .table-responsive .table {
    min-width: 700px;
  }
  
  .table-responsive .table td:nth-child(4),
  .table-responsive .table th:nth-child(4),
  .table-responsive .table td.note-col,
  .table-responsive .table th.note-col {
    min-width: 250px;
    white-space: normal;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

/* Column utility classes */


.table th {
  background: #f8fafc;
  padding: 14px 16px;
  font-weight: 700;
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: #1A202C !important;
  vertical-align: middle;
}

/* Ensure actions have gap */
.table td div[style*="display:flex"] {
  gap: 8px !important;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f9fafb; }


/* ─────────────────────────────────────────
   BADGES
───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-neutral { background: #f3f4f6; color: #374151; }
.badge-primary { background: #eff6ff; color: var(--color-primary); }
.badge-gold    { background: #fef3c7; color: #92400e; }

/* ─────────────────────────────────────────
   ALERTS
───────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }

/* ─────────────────────────────────────────
   LOADING & EMPTY STATES
───────────────────────────────────────── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.loading-inner { text-align: center; }
.loading-logo {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 16px;
}
.loading-text { font-size: 2rem; font-weight: 800; color: white; }
.loading-sub { font-size: 0.9rem; color: rgba(255,255,255,0.65); margin-bottom: 24px; }
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
}
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.4; display: block; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

.error-page {
  text-align: center;
  padding: 60px 24px;
}
.error-page i { font-size: 3rem; color: var(--color-danger); margin-bottom: 16px; display: block; }
.error-page h3 { font-size: 1.1rem; margin-bottom: 8px; }
.error-page p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 24px; }

/* ─────────────────────────────────────────
   PAGINATION
───────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
}
.pagination button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: white;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.pagination button:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* ─────────────────────────────────────────
   MISC
───────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.fw-bold { font-weight: 700; } .fw-600 { font-weight: 600; }
.text-sm { font-size: 0.85rem; } .text-xs { font-size: 0.78rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

/* PAGE HEADER */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-title { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.page-header-sub { font-size: 0.875rem; color: var(--text-secondary); margin-top: 4px; }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* SEARCH BAR */
.search-bar {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-bar i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.search-bar input {
  padding-left: 40px;
  min-width: 240px;
}

/* ─────────────────────────────────────────
   NOTIF BADGE ON ICON
───────────────────────────────────────── */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close { display: block; }
  .sidebar-overlay { display: block; }

  .main-content { margin-left: 0; }
  .topbar-menu { display: flex; }
  .page-content { padding: 16px; }

  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }

  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header-actions { width: 100%; }
  .page-header-actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
  .table th, .table td { padding: 10px 12px; font-size: 0.8rem; }
  .stat-value { font-size: 1.4rem; }
}

/* ─────────────────────────────────────────
   ACTIVITY CARDS (Modern Feed)
───────────────────────────────────────── */
.activity-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeIn 0.4s ease-out;
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -12px rgba(0,0,0,0.15);
}

.activity-card-accent { display: none; } /* Removed left-border for cleaner aesthetic */

.activity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  width: 100%;
}

.activity-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.activity-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary), #4f46e5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 4px 10px -2px rgba(79, 70, 229, 0.4);
}

.activity-card-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.activity-card-tags {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.activity-tag {
  background: #e0e7ff;
  color: #4338ca;
  font-weight: 700;
  font-size: 0.65rem;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.activity-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #b45309;
  font-weight: 700;
}

.activity-date {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.activity-body {
  margin-top: 14px;
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  font-size: 1rem;
  color: #334155;
  line-height: 1.6;
  position: relative;
  font-family: 'Inter', sans-serif;
}

.activity-body i.fa-quote-left {
  position: absolute;
  top: -10px;
  left: 12px;
  color: var(--color-primary);
  opacity: 0.2;
  font-size: 1.5rem;
  background: white;
  padding: 0 4px;
}

.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid #f8fafc;
}

.activity-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-author-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 0.85rem;
}

.activity-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.activity-author-name span {
  color: var(--color-primary);
  border-bottom: 2px solid #e0e7ff;
}

.activity-official-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* Specific type colors */
/* Event Specialized Layout (Date Badge) */
.event-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.event-date-badge {
  width: 70px;
  height: 70px;
  background: #1e3a8a; /* Solid blue */
  color: #ffffff;      /* White text */
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.event-date-day {
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
}

.event-date-month {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-info {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.event-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Centered Body for Gratitude and Report Cards */
.activity-body-centered {
  text-align: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px dashed #cbd5e1;
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.6;
  margin-top: 8px;
}

/* Specific type colors (overrides) */
.type-report-card .activity-card-avatar { background: #1e3a8a; }
.type-gratitude .activity-card-avatar { background: #db2777; }

/* Responsive Row Layout (save space on mobile) */
@media (max-width: 768px) {
  .event-row {
    flex-wrap: nowrap; /* Do not stack on mobile */
  }
  .event-date-badge {
    width: 60px;
    height: 60px;
  }
  .event-date-day { font-size: 1.3rem; }
  .activity-card { padding: 18px; }
  
  /* Mobile Visibility Fix */
  .feed-container, #latest-report, #latest-progress, #latest-announcement, #latest-event {
    min-height: auto;
    overflow: visible;
    display: block !important;
    padding: 0 15px; /* Added 15px lateral padding for mobile */
  }
}

/* Mobile Small Devices (Reduce Title typography by 10%) */
@media (max-width: 480px) {
  .page-header-title { font-size: 1.35rem; } /* 10% down from 1.5rem */
  .activity-card-name { font-size: 0.9rem; } /* 10% down from 1rem */
  .event-title { font-size: 0.99rem; } /* 10% down from 1.1rem */
  .section-title { font-size: 1.08rem; } /* 10% down from 1.2rem */
  .activity-card { margin-bottom: 16px; width: 100%; box-sizing: border-box; }
}

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


/* ─────────────────────────────────────────
   KINDER HIVE HUB: ACADEMIC PROGRESS (PREMIUM)
───────────────────────────────────────── */
.activity-card.type-progress-premium {
  background-color: #E1F5FE !important;
  border-radius: 3.4375rem !important; /* 55px */
  border: 0.25rem solid rgba(255, 255, 255, 0.4) !important;
  padding: 2rem !important;
  box-shadow: var(--shadow-lg) !important;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 15rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 1.5rem auto;
}

.progress-card-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.star-icon-glass {
  width: 5rem;
  height: 5rem;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #0ea5e9;
  box-shadow: var(--shadow-lg);
  margin-bottom: 0.75rem;
}

.progress-student-header {
  grid-column: span 4;
}

.progress-student-header h5 {
  color: #002147;
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0 0 0.5rem 0;
}

.progress-message-block {
  grid-column: span 6;
  position: relative;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.quote-decor {
  font-family: 'Georgia', serif;
  font-size: 5rem;
  opacity: 0.1;
  position: absolute;
  line-height: 1;
  pointer-events: none;
}
.quote-left-fix { left: -1.25rem; top: -1.25rem; }
.quote-right-fix { right: -0.625rem; bottom: -2.5rem; }

.progress-text-italic {
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  color: #1e293b;
  line-height: 1.6;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  max-width: 90%;
  margin: 0 auto;
}

.date-badge-oxford {
  grid-column: span 2;
  justify-self: end;
  background: #002147;
  color: #ffffff;
  padding: 1.5rem 1rem;
  border-radius: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 5.625rem;
  text-align: center;
  box-shadow: 0 0.5rem 1.5625rem rgba(0, 33, 71, 0.2);
}

.oxford-day { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.oxford-month { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; margin-top: 0.375rem; letter-spacing: 0.05em; }

.star-decor-overlay {
  position: absolute;
  bottom: -1.875rem;
  right: -1.875rem;
  font-size: 15.625rem;
  opacity: 0.05;
  transform: rotate(12deg);
  color: #002147;
  pointer-events: none;
  z-index: 0;
}

.progress-tag-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.progress-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.875rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #002147;
}

@media (max-width: 768px) {
  .activity-card.type-progress-premium {
    border-radius: 2.5rem !important;
    padding: 1.5rem !important;
    width: calc(100% - 30px); /* 15px margin lateral */
    margin: 0 15px 1.5rem 15px;
  }
  .progress-card-container {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 1.75rem;
  }
  .progress-student-header, .progress-message-block, .date-badge-oxford {
    width: 100%;
    justify-self: center;
  }
  .date-badge-oxford {
    order: 3;
    flex-direction: row;
    gap: 1rem;
    padding: 0.75rem 2rem;
    min-width: 10rem;
    border-radius: 1.25rem;
    width: 100%;
  }
  .oxford-day { font-size: 1.8rem; }
  .star-icon-glass { margin: 0 auto 0.75rem; }
  .quote-decor { font-size: 3.5rem; }
  .progress-text-italic { font-size: 1.15rem; }
}

@media (max-width: 480px) {
  .activity-card.type-progress-premium {
    border-radius: 1.875rem !important; /* 30px */
    padding: 1.25rem !important;
  }
  .oxford-day { font-size: 1.6rem; }
}

/* ─────────────────────────────────────────
   KINDER HIVE HUB: UNIVERSAL DATA SECTIONS (v4.5)
───────────────────────────────────────── */
.hive-data-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 15px 30px;
}

.premium-card-hive {
  background: #ffffff !important;
  border-radius: 25px !important;
  padding: 1.5rem !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  width: 100% !important;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.premium-card-hive:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

/* Row alignment within cards */
.hive-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hive-card-main {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.hive-card-val {
  text-align: right;
  font-weight: 800;
  color: #002147;
}

/* 48px Touch Targets for Android */
.btn-premium-touch {
  min-height: 48px !important;
  padding: 12px 24px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─────────────────────────────────────────
   KINDER HIVE HUB: REPORT CARDS (PREMIUM)
───────────────────────────────────────── */
.report-card-premium {
  background: #ffffff !important;
  border-radius: 30px !important;
  border-top: 8px solid #002147 !important;
  padding: 1.5rem !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 1.5rem auto;
  position: relative;
  transition: transform 0.2s ease;
}

.report-card-premium:hover {
  transform: translateY(-5px);
}

.report-card-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.report-subject-info {
  flex: 1;
}

.report-subject-name {
  color: #002147;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.report-subject-period {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.score-circle {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.bg-success-subtle { background-color: #dcfce7; color: #166534; border: 2px solid #bbf7d0; }
.bg-warning-subtle { background-color: #fef9c3; color: #854d0e; border: 2px solid #fef08a; }
.bg-error-subtle { background-color: #fee2e2; color: #b91c1c; border: 2px solid #fecaca; }

.report-notes-premium {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed #e2e8f0;
  font-style: italic;
  font-size: 0.9rem;
  color: #475569;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.5;
}

.btn-download-premium {
  border-radius: 50px !important;
  padding: 0.75rem 1.5rem !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 20px -5px rgba(138, 43, 226, 0.4) !important;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  color: white !important;
  border: none !important;
  transition: all 0.3s ease !important;
}

.btn-download-premium:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 25px -5px rgba(138, 43, 226, 0.5) !important;
}

@media (max-width: 600px) {
  .report-card-grid {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .score-circle {
    width: 80px;
    height: 80px;
    font-size: 1.75rem;
    margin: 0 auto;
  }
  .report-notes-premium {
    text-align: center;
  }
}

/* ─────────────────────────────────────────
   KINDER HIVE HUB: PAYMENTS (PREMIUM)
───────────────────────────────────────── */
.payment-card-premium {
  background: #ffffff !important;
  border-radius: 25px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
  border-left: 6px solid #002147 !important;
  padding: 1.25rem 1.5rem !important;
  margin-bottom: 1rem !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
}

.payment-card-premium:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08) !important;
}

.payment-icon-box {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.bg-pay-success { background-color: #dcfce7 !important; color: #166534 !important; }
.bg-pay-pending { background-color: #fef9c3 !important; color: #854d0e !important; }
.bg-pay-error { background-color: #fee2e2 !important; color: #991b1b !important; }

.payment-info-primary {
  flex: 1;
}

.payment-student-name {
  color: #002147;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 2px;
}

.payment-concept {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 500;
}

.payment-date-elegant {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.payment-amount-premium {
  font-size: 1.25rem;
  font-weight: 800;
  color: #002147;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .payment-card-premium {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem !important;
    gap: 1rem;
  }

  .payment-card-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .payment-amount-premium {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.15rem;
  }

  .payment-actions-mobile {
    width: 100%;
    margin-top: 0.5rem;
  }

  .payment-actions-mobile .btn {
    width: 100% !important;
    justify-content: center;
    min-height: 48px;
  }
}
/* ─────────────────────────────────────────
   KINDER HIVE HUB: PAYMENTS (RICH DATA v2.9)
   Architecture: Oxford Blue + Tabular Precision
───────────────────────────────────────── */
.payment-history-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 0.5rem;
}

.payment-card-rich {
  background: #ffffff !important;
  border-radius: 25px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
  border-left: 8px solid #002147 !important;
  padding: 1.75rem !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

/* ─────────────────────────────────────────
   MODAL: REGISTER PAYMENT (MOBILE FIX)
   ───────────────────────────────────────── */
@media (max-width: 768px) {
  .register-payment-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

/* ─────────────────────────────────────────
   KINDER HIVE HUB: PREMIUM GALLERY (v6.1_FINAL_HIVE_LOOK)
   Architecture: Card-based, Information Below Image
   Color: Purple Institutional #6a1b9a
───────────────────────────────────────── */
.gallery-albums-grid-legacy {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 1.5rem 1rem 4rem;
  max-width: 1250px;
  margin: 0 auto;
}

.gallery-card-hive {
  background: #ffffff;
  border-radius: 35px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,0,0,0.02);
  cursor: pointer;
  height: 100%;
}

.gallery-card-hive:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.card-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 800;
  color: #002147;
  letter-spacing: 0.1em;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card-image-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

.card-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card-hive:hover .card-image-container img {
  transform: scale(1.05);
}

.card-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-family: 'Playfair Display', serif !important;
  font-style: italic;
  font-size: 1.45rem;
  font-weight: 700;
  color: #4c1d95; /* Deep Purple */
  margin: 0;
  line-height: 1.25;
  text-transform: uppercase;
}

.card-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
}

.card-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
}

.btn-expand {
  color: #6a1b9a !important; /* Púrpura Institucional */
  font-weight: 800;
  text-transform: uppercase;
  background: #f3e8ff;
  border: none;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-expand:hover {
  background: #6a1b9a;
  color: #ffffff !important;
  transform: scale(1.05);
}

/* ─────────────────────────────────────────
   MODAL: LINK INPUT PREMIUM (ADMIN)
   Architecture: Icons inside Input Wrapper
───────────────────────────────────────── */
.link-input-wrapper {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-input-wrapper label {
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-with-icons {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icons i {
  position: absolute;
  left: 20px;
  font-size: 1.25rem;
}

.input-with-icons i.fa-instagram { color: #e1306c; opacity: 0.8; }
.input-with-icons i.fa-youtube { color: #ff0000; opacity: 0.8; margin-left: 30px; }

.input-with-icons input {
  width: 100%;
  padding: 14px 20px 14px 80px !important;
  border-radius: 50px !important;
  border: 2px solid #e2e8f0 !important;
  font-size: 0.95rem;
  background: #f8fafc !important;
  transition: all 0.3s ease;
}

.input-with-icons input:focus {
  border-color: #6a1b9a !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(106, 27, 154, 0.1);
}

@media (max-width: 600px) {
  .gallery-albums-grid-legacy {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
}

/* ─────────────────────────────────────────
   FLOATING ACTION BUTTON (FAB) v6.4
───────────────────────────────────────── */
.fab-gallery {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 64px;
  height: 64px;
  background: #6a1b9a;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 25px rgba(106, 27, 154, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
}

.fab-gallery:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 15px 35px rgba(106, 27, 154, 0.6);
}

.fab-gallery i {
  color: white;
}

/* Fallback para imagen rota/vacía */
.image-placeholder-hive {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6a1b9a, #4a148c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
}

.image-placeholder-hive i {
  font-size: 4rem;
}

.btn-social {
  border-radius: 50px !important;
  padding: 12px 24px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: none !important;
}

.btn-social:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-instagram {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
  color: white !important;
}

.btn-youtube {
  background: #FF0000 !important;
  color: white !important;
}




/* ─────────────────────────────────────────
   THANKS HIVE DESIGN SYSTEM
───────────────────────────────────────── */
.thanks-grid-hive {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 1rem 0 3rem;
}

.thanks-card-hive {
    background: #ff8f1c; /* Naranja vibrante Hive */
    border-radius: 48px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(255, 143, 28, 0.2);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.thanks-card-hive:hover {
    transform: translateY(-10px);
}

.thanks-card-hive::after {
    content: "\f004"; /* fa-heart */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    bottom: -30px;
    right: -20px;
    font-size: 180px;
    color: white;
    opacity: 0.1;
    transform: rotate(12deg);
    pointer-events: none;
}

.thanks-badge-hive {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.thanks-message-hive {
    color: white;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    z-index: 2;
}

.thanks-author-hive {
    color: white;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 2;
    opacity: 0.9;
}

.thanks-actions-hive {
    position: absolute;
    bottom: 1.5rem;
    left: 2.5rem;
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.thanks-actions-hive .btn-xs {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thanks-actions-hive .btn-xs:hover {
    background: white;
    color: #ff8f1c;
}

@media (max-width: 900px) {
    .thanks-grid-hive {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .thanks-card-hive {
        padding: 2.5rem 1.75rem;
        border-radius: 32px;
    }
    .thanks-message-hive {
        font-size: 1.2rem;
    }
}

/* ─────────────────────────────────────────
   TOAST NOTIFICATIONS v7.0
   ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 12px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: slideUp 0.3s ease-out;
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,0.1);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(20px) translateX(-50%);
  transition: all 0.5s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ─────────────────────────────────────────
   SKELETONS & TIMEOUT UI v7.0
   ───────────────────────────────────────── */
.loading-skeleton-dashboard {
  background: #f1f5f9;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.9rem;
  border: 2px dashed #e2e8f0;
  animation: pulseSkeleton 1.5s infinite ease-in-out;
  margin: 10px 0;
}

@keyframes pulseSkeleton {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.timeout-discrete {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeout-discrete:hover {
  background: #f1f5f9;
  transform: scale(1.02);
}

/* ──────────────────────────────────────────────────────────────
   BANNER DE PROPÓSITO DINÁMICO v8.5.4
   Efecto Marquee Infinito para Dashboards
   ────────────────────────────────────────────────────────────── */
.marquee-banner {
  background: #0f172a;
  color: #fbbf24;
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  z-index: 5; /* Asegura que no tape menús desplegables */
  box-shadow: inset 0 -2px 10px rgba(0,0,0,0.3);
  margin-bottom: 20px;
  border-bottom: 2px solid #fbbf24;
}

.marquee-content {
  display: flex;
  gap: 60px;
  white-space: nowrap;
  animation: scroll-left-banner 45s linear infinite;
  padding-left: 20px;
}

.marquee-content span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
}

.marquee-banner:hover .marquee-content {
  animation-play-state: paused;
  cursor: help;
}

@keyframes scroll-left-banner {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .marquee-banner {
    height: 32px;
    margin-bottom: 16px;
  }
  .marquee-content span {
    font-size: 0.85rem; /* Ajuste para móviles */
    letter-spacing: 0.08em;
  }
}
