:root {
  --bg: #090d12;
  --bg-soft: #0f1620;
  --panel: #111a24;
  --panel-2: #0d141d;
  --border: rgba(30, 108, 255, 0.35);
  --border-strong: rgba(0, 217, 255, 0.45);
  --text: #d9e4f2;
  --muted: #8ea2b8;
  --primary: #1e6cff;
  --accent: #00d9ff;
  --success: #42ff9b;
  --danger: #ff5f87;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --banner-h: 74px;
  --footer-h: 42px;
  --gap: 12px;

}



* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background:
    radial-gradient(circle at top left, rgba(30, 108, 255, 0.15), transparent 30%),
    radial-gradient(circle at top right, rgba(0, 217, 255, 0.10), transparent 25%),
    linear-gradient(180deg, #05080c 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  overflow: hidden;


}

/* Fondo técnico tipo radar */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(47,107,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,107,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Círculos radar sutiles */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center,
      rgba(47,107,255,0.05) 0px,
      rgba(47,107,255,0.03) 120px,
      transparent 260px),
    radial-gradient(circle at center,
      rgba(47,107,255,0.04) 0px,
      transparent 420px);
  pointer-events: none;
  z-index: 0;
}



.app-shell {
  height: 100vh;
  display: grid;
  grid-template-rows: var(--banner-h) 1fr var(--footer-h);
  gap: var(--gap);
  padding: var(--gap);
}

.banner,
.footer-bar,
.panel {
  background: linear-gradient(180deg, rgba(17, 26, 36, 0.96), rgba(10, 15, 22, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.banner::after,
.footer-bar::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.banner {
  display: grid;
  grid-template-columns: 1.3fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 108, 255, 0.95), rgba(0, 217, 255, 0.7));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  letter-spacing: 0.08em;
  box-shadow: 0 0 22px rgba(30, 108, 255, 0.25);
}

.brand-title-wrap {
  min-width: 0;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(66, 255, 155, 0.22);
  border-radius: 999px;
  font-size: 0.82rem;
  color: #caf8de;
  background: rgba(66, 255, 155, 0.06);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(66, 255, 155, 0.75);
}

.datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 170px;
}

.time {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.05em;
}

.date {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 2px;
  text-align: right;
}

.profile-select {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(17, 26, 36, 1), rgba(8, 12, 18, 1));
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 220px;
  font-size: 0.92rem;
  outline: none;
  cursor: pointer;
}

.main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) 8px minmax(360px, 1.25fr);
  gap: 0;
  --left-col: 0.95fr;
  --right-col: 1.25fr;
}

.column {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  gap: 0;
}

.left-column {
  grid-template-rows: minmax(180px, 1fr) 8px minmax(180px, 1fr);
  --top-row: 1fr;
  --bottom-row: 1fr;
}

.right-column {
  grid-template-rows: minmax(140px, 0.7fr) 8px minmax(180px, 1fr) 8px minmax(180px, 1fr);
  --top-row: 0.7fr;
  --middle-row: 1fr;
  --bottom-row: 1fr;
}

.panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.panel-slot {
  min-height: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 56px;
}

.panel-title-wrap {
  min-width: 0;
}

.panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f2f6fb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-subtitle {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tab-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.tab-bar::-webkit-scrollbar {
  height: 6px;
}

.tab-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}

.tab-btn.active {
  color: white;
  border-color: rgba(0, 217, 255, 0.4);
  background: linear-gradient(180deg, rgba(30, 108, 255, 0.22), rgba(0, 217, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.12);
}

.panel-content {
  min-height: 0;
  height: 100%;
  padding: 10px 12px 12px;
  overflow: hidden;
}

.content-frame,
.content-fallback,
.calendar-card,
.links-grid,
.rss-list,
.html-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 12px;
}

iframe.content-frame {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c1218;
}

.content-fallback,
.html-card,
.calendar-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
  padding: 18px;
  overflow: auto;
}

.fallback-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.fallback-text,
.calendar-meta,
.rss-item-meta,
.footer-bar,
.link-card small,
.html-card p {
  color: var(--muted);
  line-height: 1.45;
}

.placeholder-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.placeholder-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: #cfe0f0;
  font-size: 0.88rem;
}

.rss-list {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.rss-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.rss-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #f2f6fb;
}

.rss-item-title a {
  color: #f2f6fb;
  text-decoration: none;
}

.rss-item-title a:hover {
  color: white;
  text-decoration: underline;
}




.rss-item-meta {
  font-size: 0.78rem;
}

.calendar-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
}

.calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-month {
  font-size: 1rem;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day,
.calendar-weekday {
  text-align: center;
  padding: 10px 4px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.calendar-weekday {
  color: var(--muted);
  font-weight: 600;
  padding: 6px 4px;
}

.calendar-day {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.calendar-day.muted {
  opacity: 0.35;
}

.calendar-day.today {
  border-color: rgba(0, 217, 255, 0.42);
  background: linear-gradient(180deg, rgba(30, 108, 255, 0.2), rgba(0, 217, 255, 0.08));
  color: white;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.links-grid {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
}

.link-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 12px;
  padding: 12px;
  transition: 0.2s ease;
}

.link-card:hover {
  border-color: rgba(0, 217, 255, 0.32);
  transform: translateY(-1px);
}

.link-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.html-card h3,
.content-fallback h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.footer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  overflow: auto;
  white-space: nowrap;
  font-size: 0.84rem;
}

.footer-link {
  color: #cfe0f0;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.footer-link:hover {
  color: white;
  border-color: rgba(0, 217, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.footer-sep {
  color: rgba(255, 255, 255, 0.18);
}

.panel-loading {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 0.9rem;
}

.resizer {
  position: relative;
  z-index: 5;
  user-select: none;
  touch-action: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.resizer::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.9;
}

.resizer:hover::before,
.resizer.is-dragging::before {
  background: linear-gradient(180deg, rgba(30, 108, 255, 0.24), rgba(0, 217, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.2);
}

.resizer-vertical {
  cursor: col-resize;
  width: 8px;
  height: 100%;
}

.resizer-vertical::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 108, 255, 0.55), rgba(0, 217, 255, 0.55));
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.12);
}

.resizer-horizontal {
  cursor: row-resize;
  width: 100%;
  height: 8px;
}

.resizer-horizontal::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(30, 108, 255, 0.55), rgba(0, 217, 255, 0.55));
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.12);
}

body.is-resizing,
body.is-resizing * {
  cursor: grabbing !important;
  user-select: none !important;
}

@media (max-width: 1280px) {
  .banner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand profile"
      "status datetime";
  }

  .brand {
    grid-area: brand;
  }

  .status-pill {
    grid-area: status;
    justify-self: start;
  }

  .datetime {
    grid-area: datetime;
  }

  .profile-select {
    grid-area: profile;
    justify-self: end;
  }
}

@media (max-width: 1080px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: var(--gap);
  }

  .left-column,
  .right-column {
    grid-template-rows: minmax(280px, 1fr);
    grid-auto-rows: minmax(280px, 1fr);
    gap: var(--gap);
  }

  .resizer {
    display: none;
  }
}

.world-clocks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.clock-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
  border-radius: 14px;
  padding: 16px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.clock-city {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.clock-time {
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-size: 1.9rem;
  font-weight: 700;
  color: #f2f6fb;
  line-height: 1.1;
  margin-bottom: 8px;
}

.clock-zone {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

@media (max-width: 560px) {
  .world-clocks-grid {
    grid-template-columns: 1fr;
  }
}

.countdowns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  height: 100%;
  align-content: start;
  overflow: auto;
}

.countdown-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
  border-radius: 14px;
  padding: 18px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.countdown-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 10px;
}

.countdown-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f2f6fb;
  margin-bottom: 12px;
}

.countdown-timer {
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-size: 1.45rem;
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 10px;
}

.countdown-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 560px) {
  .countdowns-grid {
    grid-template-columns: 1fr;
  }
}

.time-dashboard-card {
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  text-align: center;
}

.time-dashboard-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 12px;
}

.time-dashboard-main {
  font-family: "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  font-size: 3rem;
  font-weight: 800;
  color: #f2f6fb;
  line-height: 1.05;
  margin-bottom: 12px;
}

.time-dashboard-date {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 10px;
  text-transform: capitalize;
}

.time-dashboard-extra {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

@media (max-width: 560px) {
  .time-dashboard-main {
    font-size: 2.2rem;
  }

  .time-dashboard-date {
    font-size: 0.9rem;
  }
}
.webcam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(140px, 1fr);
  gap: 10px;
  height: 100%;
}

.webcam-grid-item {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
}

.webcam-grid-item iframe {
  width: 100%;
  height: calc(100% - 28px);
  border: none;
  display: block;
}

.webcam-grid-label {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 560px) {
  .webcam-grid {
    grid-template-columns: 1fr;
  }
}

.webcam-grid-item--placeholder {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
}

.webcam-grid-loader {
  flex: 1;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.lazy-embed {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.lazy-embed-placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 23, 33, 0.95), rgba(8, 12, 18, 0.95));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.lazy-embed-loader {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.lazy-embed-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}



.footer-link {
  color: #2f6bff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-link:hover {
  color: #ffffff;
  text-shadow: 0 0 6px #4c82ff, 0 0 12px #2f6bff;
}

.footer-sep {
  opacity: 0.4;
}

#footerLinks { font-family: monospace; }



/* HEADER estilo terminal */

header {
  background: linear-gradient(90deg, #0b0f1a, #111a2e);
  border-bottom: 1px solid #2f6bff;
  box-shadow: 0 0 8px rgba(47,107,255,0.5);
}

#appTitle {
  color: #ffffff;
  letter-spacing: 0.06em;
}

#appSubtitle {
  color: #6f8fff;
}

/* FOOTER estilo Bloomberg */

footer {
  background: linear-gradient(90deg, #0a0e18, #0f1b34);
  border-top: 1px solid #2f6bff;
  box-shadow: 0 0 8px rgba(47,107,255,0.5) inset;
}

#footerLinks {
  display: flex;
  justify-content: left;
  gap: 14px;
  font-family: monospace;
  font-size: 13px;
}

#footerLinks {
  animation: tickerMove 40s linear infinite;
}

/* Paneles más definidos tipo control room */
.panel {
  border: 1px solid rgba(47, 107, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(47, 107, 255, 0.10),
    0 0 12px rgba(47, 107, 255, 0.08),
    inset 0 0 10px rgba(47, 107, 255, 0.03);
}

/* Resizers con presencia más "pro" */
.resizer::before {
  background: linear-gradient(
    180deg,
    rgba(47, 107, 255, 0.14),
    rgba(76, 130, 255, 0.06)
  );
}

.resizer:hover::before,
.resizer.is-dragging::before {
  background: linear-gradient(
    180deg,
    rgba(47, 107, 255, 0.30),
    rgba(76, 130, 255, 0.16)
  );
  box-shadow:
    inset 0 0 0 1px rgba(76, 130, 255, 0.22),
    0 0 10px rgba(47, 107, 255, 0.18);
}

/* Cabeceras de panel más técnicas */
.panel-header {
  background: linear-gradient(
    90deg,
    rgba(16, 24, 38, 0.95),
    rgba(12, 19, 31, 0.90)
  );
  border-bottom: 1px solid rgba(47, 107, 255, 0.18);
}

.panel-title {
  color: #dfe8ff;
  text-shadow: 0 0 6px rgba(47, 107, 255, 0.18);
  position: relative;
}

.panel-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #2f6bff;
  margin-right: 8px;
  border-radius: 2px;
  transform: translateY(-1px);
}


/* Pulso sutil de títulos */
.panel-title {
  animation: panelTitlePulse 4.5s ease-in-out infinite;
}

@keyframes panelTitlePulse {
  0% {
    text-shadow: 0 0 4px rgba(47, 107, 255, 0.10);
  }
  50% {
    text-shadow: 0 0 10px rgba(47, 107, 255, 0.28);
  }
  100% {
    text-shadow: 0 0 4px rgba(47, 107, 255, 0.10);
  }
}

.tab-btn.active {
  box-shadow:
    inset 0 0 0 1px rgba(76, 130, 255, 0.18),
    0 0 8px rgba(47, 107, 255, 0.12);
}

.tab-btn:hover {
  box-shadow: 0 0 8px rgba(47, 107, 255, 0.08);
}

