/* -------------------------------------------------------------
   GNZDEV Portal - Dual Theme Minimalist (Mobile First & Optimized)
   ------------------------------------------------------------- */

/* Variables: TEMA CLARO */
:root, [data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --accent-cyan: #0284c7;
  --accent-cyan-bg: #f0f9ff;
  --accent-cyan-border: #bae6fd;

  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;
  --accent-purple-border: #ddd6fe;

  --chat-card-bg: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
  --chat-glow: rgba(124, 58, 237, 0.08);

  --btn-github-bg: #0f172a;
  --btn-github-hover: #1e293b;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-spotlight: 0 10px 25px -5px rgba(124, 58, 237, 0.12), 0 8px 10px -6px rgba(124, 58, 237, 0.06);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Variables: TEMA OSCURO */
[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-surface: #131b2a;
  --bg-subtle: #1a2438;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-bg: rgba(56, 189, 248, 0.12);
  --accent-cyan-border: rgba(56, 189, 248, 0.3);

  --accent-purple: #a855f7;
  --accent-purple-light: rgba(168, 85, 247, 0.14);
  --accent-purple-border: rgba(168, 85, 247, 0.35);

  --chat-card-bg: linear-gradient(135deg, #131b2a 0%, #1e1b38 100%);
  --chat-glow: rgba(168, 85, 247, 0.18);

  --btn-github-bg: #1e293b;
  --btn-github-hover: #334155;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.4);
  --shadow-spotlight: 0 12px 28px -4px rgba(168, 85, 247, 0.22);
}

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

html {
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  width: 100%;
}

.app-shell {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------------- HEADER / TOP NAV ---------------- */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  width: 100%;
}

.nav-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  user-select: none;
  white-space: nowrap;
}
.logo-accent { color: var(--accent-cyan); }
.logo-main { color: var(--text-main); }
.domain {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.search-bar-container {
  flex: 1;
  max-width: 580px;
  min-width: 0;
}
.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 4px 8px;
  transition: all 0.2s ease;
  width: 100%;
}
.search-form:focus-within {
  background: var(--bg-surface);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.engine-selector {
  display: flex;
  gap: 4px;
  padding-right: 6px;
  border-right: 1px solid var(--border-light);
  flex-shrink: 0;
}
.engine-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 4px;
}
.engine-btn:hover {
  background: rgba(128, 128, 128, 0.12);
}
.engine-btn.active {
  background: var(--bg-surface);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  border: 1px solid var(--border-light);
}

.search-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 0.92rem;
  font-family: inherit;
}
.search-form input::placeholder {
  color: var(--text-light);
}
.search-submit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.search-submit:hover {
  color: var(--accent-cyan);
}

.header-right-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.theme-toggle-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
  background: var(--border-hover);
  color: var(--text-main);
}
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; color: #facc15; }
[data-theme="dark"] .moon-icon { display: none; }

.datetime-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  white-space: nowrap;
}
.clock {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}
.date-info {
  display: flex;
  flex-direction: column;
}
.weather-temp {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
}
.date-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------------- PUBLICIDAD NEWZEIT ---------------- */
.ad-banner-strip {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  width: 100%;
}
.ad-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ad-content-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
  transition: opacity 0.2s;
}
.ad-content-link:hover { opacity: 0.92; }
.ad-logo-mark {
  background: #38bdf8;
  color: #0f172a;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 3px 7px;
  border-radius: 6px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.ad-text-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.ad-highlight {
  font-weight: 700;
  font-size: 0.85rem;
  color: #f8fafc;
  word-break: break-word;
}
.ad-tagline {
  font-size: 0.78rem;
  color: #94a3b8;
  word-break: break-word;
}

/* ---------------- LAYOUT GRID ---------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  width: 100%;
}
.main-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  width: 100%;
}

/* ---------------- FEATURED ACCESS (CHAT SPOTLIGHT) ---------------- */
.featured-access-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.chat-spotlight-card {
  position: relative;
  background: var(--chat-card-bg);
  border: 2px solid var(--accent-purple-border);
  border-radius: 22px;
  padding: 30px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  box-shadow: var(--shadow-spotlight);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  width: 100%;
}

.chat-spotlight-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
  box-shadow: 0 16px 32px -4px rgba(124, 58, 237, 0.25);
}

.chat-spotlight-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, var(--chat-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.spotlight-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.spotlight-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  position: relative;
}

.live-ping {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  position: absolute;
  left: 9px;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.live-core {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

@keyframes ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}

.spotlight-sub-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-purple);
  background: var(--accent-purple-light);
  padding: 3px 10px;
  border-radius: 99px;
}

.spotlight-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1.25;
  word-break: break-word;
}

.spotlight-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.5;
  word-break: break-word;
}

.channels-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.chan-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
}
.chan-more {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
  border-color: var(--accent-purple-border);
  font-weight: 600;
}

.spotlight-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.chat-cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.btn-chat-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 15px 30px;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-chat-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 26px rgba(124, 58, 237, 0.45);
}

.direct-link-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* BANNER SECUNDARIO WEBTOOLS */
.tools-secondary-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, background-color 0.25s ease;
  width: 100%;
  flex-wrap: wrap;
}
.tools-secondary-banner:hover {
  border-color: var(--accent-cyan);
}

.tools-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 220px;
}
.tools-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-cyan-bg);
  border: 1px solid var(--accent-cyan-border);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.tools-info h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.tools-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tools-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip-sm {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 5px;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip-sm code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 600;
}

.btn-tools-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--accent-cyan-bg);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan-border);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-tools-link:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
}

/* ---------------- MIS ACCESOS (EDITABLE) ---------------- */
.bookmarks-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  width: 100%;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.title-with-desc h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}
.sub-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.secondary-btn:hover { background: var(--border-hover); }
.text-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}
.text-btn:hover { color: var(--text-main); }

.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 14px;
  width: 100%;
}

.bookmark-item {
  position: relative;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
  min-width: 0;
}
.bookmark-item:hover {
  background: var(--bg-surface);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.bm-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.bm-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bm-edit-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
  cursor: pointer;
  color: var(--text-muted);
  transition: opacity 0.15s ease, background 0.15s ease;
}
.bookmark-item:hover .bm-edit-btn {
  opacity: 1;
}
.bm-edit-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ---------------- SIDEBAR WIDGETS ---------------- */
.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.side-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.25s ease, border-color 0.25s ease;
  width: 100%;
}

/* Widget Desarrollador & Contacto */
.dev-contact-card {
  border-left: 4px solid var(--accent-cyan);
}
.dev-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.dev-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
}
.dev-details h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}
.dev-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dev-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dev-links-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dev-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  text-align: center;
}
.btn-mail {
  background: var(--accent-cyan-bg);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan-border);
}
.btn-mail:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
}
.btn-github {
  background: var(--btn-github-bg);
  color: #ffffff;
}
.btn-github:hover { background: var(--btn-github-hover); }
.btn-linkedin {
  background: #0a66c2;
  color: #ffffff;
}
.btn-linkedin:hover { background: #084d94; }

.side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.header-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}
.header-label h4 {
  font-size: 0.95rem;
  font-weight: 700;
}
.icon-btn-subtle {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
}
.icon-btn-subtle:hover { color: #ef4444; }

.notepad-body textarea {
  width: 100%;
  height: 120px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.notepad-body textarea:focus {
  border-color: var(--accent-cyan);
  background: var(--bg-surface);
}

.notepad-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.78rem;
}
.save-status {
  color: #10b981;
  font-weight: 600;
}
.pill-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.15s;
}
.pill-btn:hover {
  background: var(--border-hover);
  color: var(--text-main);
}

/* Calendario */
.cal-nav { display: flex; gap: 4px; }
.cal-nav-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-nav-btn:hover {
  background: var(--border-hover);
  color: var(--text-main);
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}
.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: 6px;
  color: var(--text-muted);
}
.cal-cell.today {
  background: var(--accent-cyan);
  color: #ffffff;
  font-weight: 700;
}
.cal-cell.empty { opacity: 0.15; }

/* ---------------- MODAL EDITAR / AGREGAR ---------------- */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.show { display: flex; }
.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}
.close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
}
.close-btn:hover { color: var(--text-main); }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
}
.form-group input:focus { border-color: var(--accent-cyan); }
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}
.modal-actions-right {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.btn-cancel {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-confirm {
  background: var(--accent-cyan);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-confirm:hover { background: #0369a1; }
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

/* =============================================================
   REGLAS RESPONSIVE (TABLETS Y MÓVILES)
   ============================================================= */

/* Tablets y Pantallas Medianas (<= 1024px) */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sidebar-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
}

/* Pantallas Intermedias (<= 860px) */
@media (max-width: 860px) {
  .top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px;
  }
  .nav-brand-row {
    justify-content: space-between;
    width: 100%;
  }
  .search-bar-container {
    max-width: 100%;
    width: 100%;
  }
  .chat-spotlight-card {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }
  .spotlight-right {
    align-items: stretch;
    width: 100%;
  }
  .btn-chat-primary {
    width: 100%;
  }
  .tools-secondary-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  .btn-tools-link {
    width: 100%;
  }
}

/* Móviles Estándar (<= 640px) */
@media (max-width: 640px) {
  .app-shell {
    padding: 12px 14px 32px;
    gap: 16px;
  }
  .brand {
    font-size: 1.3rem;
  }
  .datetime-badge {
    gap: 8px;
  }
  .clock {
    font-size: 1.35rem;
  }
  .weather-temp {
    font-size: 0.75rem;
  }
  .date-text {
    display: none; /* Ocultar fecha larga en móviles para ahorrar espacio */
  }
  .ad-banner-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 14px;
    gap: 8px;
  }
  .ad-content-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .spotlight-title {
    font-size: 1.35rem;
  }
  .spotlight-desc {
    font-size: 0.88rem;
  }
  .channel-preview {
    gap: 6px;
  }
  .chan-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
  }
  .bookmarks-section {
    padding: 18px 14px;
  }
  .bookmarks-grid {
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 10px;
  }
  .bookmark-item {
    padding: 12px 6px;
  }
  .bm-icon-circle {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
  .bm-title {
    font-size: 0.78rem;
  }
  .sidebar-column {
    grid-template-columns: 1fr;
  }
  .side-card {
    padding: 16px;
  }
}
