:root {
  --bg-page: #f8fafc;
  --bg-white: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --brand-red: #e11d48;
  --brand-red-soft: #ffe4e6;
  --brand-blue: #1d4ed8;
  --brand-blue-soft: #eff6ff;
  --brand-amber: #d97706;
  --brand-amber-soft: #fef3c7;
  --brand-green: #059669;
  --brand-green-soft: #d1fae5;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.14);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --sidebar-width: 280px;
  --ticker-height: 38px;
  --header-height: 92px;
}

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

body {
  font-family: 'Inter', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-white);
  color: var(--text-primary);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= 1. TOP FLASH NEWS TICKER ================= */
.flash-ticker-bar {
  background: #0f172a;
  color: #ffffff;
  height: var(--ticker-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1100;
  width: 100%;
}

.flash-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.flash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 5px;
  white-space: nowrap;
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.3); }
}

.flash-content-wrap {
  flex: 1;
  overflow: hidden;
  cursor: pointer;
}

.flash-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

.flash-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.flash-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.flash-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ================= 2. FULL-WIDTH WHITE HEADER WITH PROMINENT LEFT CORNER RECTANGLE LOGO ================= */
.site-header {
  position: sticky;
  top: var(--ticker-height);
  z-index: 1050;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px 0 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  width: 100%;
  box-shadow: var(--shadow-xs);
}

.header-top {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left-group {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: var(--sidebar-width);
  padding: 6px 20px;
  border-right: 1px solid var(--border-light);
  background: #ffffff;
  flex-shrink: 0;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.brand-wide-logo {
  height: 78px;
  width: auto;
  max-width: 225px;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 9px 16px 9px 36px;
  border-radius: 99px;
  font-size: 0.85rem;
  width: 270px;
  transition: all 0.2s;
}
.search-box input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
  width: 320px;
}
.search-box .search-icon {
  position: absolute;
  left: 13px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.83rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-live {
  background: var(--brand-red);
  color: #ffffff;
}
.btn-live:hover {
  background: #be123c;
}

.btn-eb {
  background: var(--brand-amber-soft);
  color: #92400e;
  border-color: #fde68a;
}
.btn-eb:hover {
  background: #fde68a;
}

.btn-install {
  background: var(--brand-blue);
  color: #ffffff;
}
.btn-install:hover {
  background: #1e40af;
}

.btn-lang {
  background: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border-light);
}
.btn-lang:hover {
  background: var(--bg-page);
}

/* ================= 3. FULL-WIDTH MASTER-DETAIL APP SHELL ================= */
.app-shell {
  width: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - (var(--ticker-height) + var(--header-height)));
  background: #ffffff;
}

/* LEFT SIDEBAR MENU */
.left-sidebar {
  background: #ffffff;
  border-right: 1px solid var(--border-light);
  position: sticky;
  top: calc(var(--ticker-height) + var(--header-height));
  height: calc(100vh - (var(--ticker-height) + var(--header-height)));
  overflow-y: auto;
  padding: 14px 12px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  z-index: 1000;
}

.left-sidebar::-webkit-scrollbar {
  width: 5px;
}
.left-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 99px;
}

.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 12px;
}

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.sidebar-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
}

.sidebar-item-btn:hover {
  background: var(--bg-page);
  color: var(--text-primary);
}

.sidebar-item-btn.active {
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  border-color: #bfdbfe;
  font-weight: 700;
}

.sidebar-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sidebar-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: all 0.15s;
}

.sidebar-item-btn.active .sidebar-icon {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.sidebar-labels {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-title-en {
  font-size: 0.86rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.25;
}

.sidebar-title-ta {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}
.sidebar-item-btn.active .sidebar-title-ta {
  color: #2563eb;
}

.sidebar-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  flex-shrink: 0;
}
.sidebar-item-btn.active .sidebar-count {
  background: var(--brand-blue);
  color: #ffffff;
}
.sidebar-count.urgent {
  background: var(--brand-red-soft);
  color: var(--brand-red);
}

.sidebar-app-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.sidebar-app-box img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid #f59e0b;
  margin-bottom: 6px;
}

/* ================= 4. RIGHT SIDE VIEWPORT ================= */
.right-viewport {
  background: #ffffff;
  padding: 28px 32px 90px;
  min-width: 0;
  width: 100%;
}

.view-panel {
  display: none;
  animation: fadeInView 0.2s ease;
}

.view-panel.active {
  display: block;
}

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

/* Top Bar inside Right View */
.view-top-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.view-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.view-badge-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--brand-blue-soft);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.view-heading {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.view-subheading {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= 5. HOME & LIVE TV DASHBOARD VIEW ================= */
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.live-player-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.live-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-screen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.live-overlay-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}

.live-onair-pill {
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-watermark {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 12px 4px 4px;
  border-radius: 99px;
}
.live-watermark img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.live-watermark span {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-primary);
}

.live-center-stage {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 20px;
  max-width: 88%;
}

.live-stream-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  margin-bottom: 14px;
}

.play-trigger-btn {
  background: #ffffff;
  color: var(--text-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
}

.live-lower-third {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(15, 23, 42, 0.92);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lower-third-tag {
  background: #fbbf24;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}

.lower-third-headline {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-player-footer {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
}

.channel-slots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.slot-chip {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.slot-chip.active {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
}

.hero-side-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.harmony-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}
.harmony-card img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  flex-shrink: 0;
}
.harmony-info h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.harmony-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Quick Access Grid on Home View */
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.quick-launch-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  font-family: inherit;
}
.quick-launch-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quick-launch-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.quick-launch-meta strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.quick-launch-meta span {
  font-size: 0.75rem;
  color: var(--brand-blue);
  font-weight: 600;
}

/* ================= 6. CARDS & GRIDS IN RIGHT VIEW ================= */
.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-btn:hover {
  background: var(--bg-page);
}
.filter-btn.active {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
}

.eb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.eb-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.eb-card.status-outage { border-top: 4px solid #ef4444; }
.eb-card.status-scheduled { border-top: 4px solid #f59e0b; }
.eb-card.status-normal { border-top: 4px solid #10b981; }

.eb-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.eb-status-pill {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.eb-status-pill.outage { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.eb-status-pill.scheduled { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.eb-status-pill.normal { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }

.eb-substation { font-size: 1rem; font-weight: 800; color: var(--text-primary); }
.eb-substation-ta { font-size: 0.8rem; color: var(--brand-blue); font-weight: 600; margin-bottom: 8px; }

.eb-time-box {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.eb-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 10px; }
.eb-areas-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.eb-areas { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.area-tag { background: var(--bg-subtle); color: var(--text-secondary); font-size: 0.74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; }
.eb-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); font-size: 0.8rem; color: var(--text-muted); }

/* News & Festivals Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.news-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
}
.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-thumb-wrap {
  position: relative;
  height: 185px;
  overflow: hidden;
  background: var(--bg-subtle);
}
.news-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
}

.news-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.news-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.news-title { font-size: 1rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; line-height: 1.4; }
.news-title-ta { font-size: 0.83rem; color: var(--brand-blue); font-weight: 600; margin-bottom: 8px; }
.news-summary { font-size: 0.83rem; color: var(--text-secondary); margin-bottom: 14px; flex: 1; }
.news-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border-light); font-size: 0.76rem; color: var(--text-muted); }

/* Event Calendar */
.calendar-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}

.calendar-box,
.calendar-agenda-panel {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.calendar-Controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-month-label { font-size: 1.08rem; font-weight: 800; color: var(--text-primary); }

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 10px;
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-day {
  min-height: 56px;
  border-radius: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cal-day:hover { border-color: var(--brand-blue); background: #ffffff; }
.cal-day.empty { background: transparent; border-color: transparent; cursor: default; }
.cal-day.is-today { border-color: var(--brand-red); background: #fff1f2; }
.cal-day.is-selected { border-color: var(--brand-blue); background: var(--brand-blue-soft); box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.15); }

.cal-day-num { font-size: 0.84rem; font-weight: 700; color: var(--text-primary); }
.cal-count-badge { font-size: 0.65rem; background: var(--brand-blue); color: #ffffff; padding: 1px 6px; border-radius: 99px; font-weight: 700; }
.cal-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; }
.cal-dot.festival { background: #d97706; }
.cal-dot.eb { background: #dc2626; }
.cal-dot.sports { background: #059669; }
.cal-dot.education { background: #7c3aed; }
.cal-dot.service { background: #0284c7; }
.cal-dot.community { background: #db2777; }

.agenda-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.agenda-list { display: flex; flex-direction: column; gap: 12px; max-height: 440px; overflow-y: auto; }
.agenda-item { background: var(--bg-page); border: 1px solid var(--border-light); border-left: 4px solid var(--brand-blue); border-radius: var(--radius-sm); padding: 14px; }

/* Directory Cards */
.cards-grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 18px; }
.cards-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }

.dir-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s, transform 0.2s;
}
.dir-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }

.dir-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dir-icon-badge { width: 42px; height: 42px; border-radius: 10px; background: var(--bg-page); border: 1px solid var(--border-light); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.tag-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 700; background: var(--brand-blue-soft); color: var(--brand-blue); }
.dir-title { font-size: 1rem; font-weight: 800; color: var(--text-primary); margin-bottom: 2px; }
.dir-title-ta { font-size: 0.82rem; color: var(--brand-blue); font-weight: 600; margin-bottom: 8px; }
.dir-meta-list { list-style: none; font-size: 0.82rem; color: var(--text-secondary); display: flex; flex-direction: column; gap: 6px; }
.score-box { background: var(--bg-page); border: 1px solid var(--border-light); border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.score-row { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--text-primary); }
.score-row + .score-row { margin-top: 4px; }
.dir-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--bg-subtle); flex-wrap: wrap; }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; border: 1px solid transparent; }
.btn-call { background: var(--brand-green-soft); color: #065f46; border-color: #a7f3d0; }
.btn-call:hover { background: #10b981; color: #ffffff; }
.btn-outline { background: #ffffff; color: var(--text-secondary); border-color: var(--border-light); }
.btn-outline:hover { background: var(--bg-page); color: var(--text-primary); }

/* ================= 7. MODALS & MOBILE NAVIGATION ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.install-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 28px 24px;
  position: relative;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
}

.install-logo-showcase { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.install-wide-preview { height: 84px; max-width: 240px; object-fit: contain; }
.install-features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; text-align: left; margin: 16px 0; }
.install-feat-item { background: var(--bg-page); border: 1px solid var(--border-light); padding: 8px 10px; border-radius: 8px; font-size: 0.78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.install-cta-group { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.btn-install-giant { background: var(--brand-blue); color: #ffffff; font-size: 0.95rem; font-weight: 700; padding: 13px 20px; border-radius: 12px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }

.floating-install-pill {
  position: fixed;
  bottom: 74px;
  right: 20px;
  z-index: 980;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 99px;
  padding: 6px 14px 6px 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.floating-install-pill img { width: 34px; height: 34px; border-radius: 50%; }

.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  display: none;
  grid-template-columns: repeat(6, 1fr);
  padding: 6px 4px 8px;
}

.mob-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}
.mob-nav-item.active { color: var(--brand-blue); }
.mob-nav-center-logo { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--brand-red); }

/* Mobile Overlay for Left Sidebar Drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1040;
}
.sidebar-backdrop.open {
  display: block;
}

/* ================= RESPONSIVE BREAKPOINTS ================= */
@media (max-width: 1100px) {
  .hero-grid,
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 76px;
  }
  .site-header {
    padding: 0 14px;
  }
  .header-left-group {
    width: auto;
    border-right: none;
    padding: 4px 0;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .brand-wide-logo {
    height: 62px;
    max-width: 175px;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .left-sidebar {
    position: fixed;
    top: calc(var(--ticker-height) + var(--header-height));
    left: 0;
    bottom: 0;
    width: 285px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1055;
  }
  .left-sidebar.open {
    transform: translateX(0);
  }
  .right-viewport {
    padding: 20px 16px 95px;
  }
  .mobile-bottom-nav {
    display: grid;
  }
  .search-box input {
    width: 145px;
  }
  .search-box input:focus {
    width: 180px;
  }
  .btn-eb,
  .btn-lang {
    display: none;
  }
  .install-features-grid {
    grid-template-columns: 1fr;
  }
}


/* ================= 8. TOP-RIGHT LOGIN & ADMIN DASHBOARD STYLES ================= */
.btn-auth {
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #0f172a;
  font-weight: 700;
}
.btn-auth:hover {
  background: #1e293b;
}
.btn-auth.logged-in {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.admin-tabs-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.admin-tab-btn {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.admin-tab-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.admin-tab-btn.active {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.admin-workspace-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  align-items: start;
}

.admin-form-card,
.admin-records-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.form-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.form-field-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-field-group input,
.form-field-group select,
.form-field-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-primary);
  background: #ffffff;
}
.form-field-group input:focus,
.form-field-group select:focus,
.form-field-group textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.admin-table-wrap {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.admin-table th {
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tr:hover td {
  background: var(--bg-page);
}

@media (max-width: 1100px) {
  .admin-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= YOUTUBE TV MAIN SCREEN (@vandavasitv) & OFFERS STYLING ================= */
.yt-tv-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.yt-tv-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.yt-tv-brand-pill .pulse-dot {
  background: var(--brand-red);
}

.yt-tv-controls-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.yt-url-input {
  padding: 5px 10px;
  border: 1px solid var(--border-hover);
  border-radius: 7px;
  font-size: 0.78rem;
  width: 210px;
  color: var(--text-primary);
  background: var(--bg-page);
}

.yt-url-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #ffffff;
}

.btn-yt-channel {
  background: #dc2626;
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}
.btn-yt-channel:hover {
  background: #b91c1c;
}

.youtube-tv-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
}

.lower-third-yt-btn {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
}
.lower-third-yt-btn:hover {
  background: #b91c1c;
}

/* VANDAVASI OFFERS CARDS */
.offer-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.offer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.offer-thumb-wrap {
  position: relative;
  height: 185px;
  overflow: hidden;
  background: #f1f5f9;
}

.offer-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-discount-ribbon {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand-red);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 99px;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
}

.offer-cat-pill {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.offer-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.offer-shop-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-amber);
  margin-bottom: 4px;
}

.offer-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-page);
  border: 1px dashed #cbd5e1;
  padding: 9px 12px;
  border-radius: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

.offer-price-now {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-green);
}

.offer-price-old {
  font-size: 0.82rem;
  color: #94a3b8;
  text-decoration: line-through;
  margin-left: 6px;
}

.coupon-pill {
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  color: #1d4ed8;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.coupon-pill:hover {
  background: #dbeafe;
}
