/* ==========================================================================
   NusaNews - Authentic Modern Editorial News Portal Stylesheet
   Designed for High Legibility, Editorial Elegance & Modern Performance
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,600;0,6..72,700;1,6..72,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;

  /* Editorial Dark Palette (Matte Slate / Charcoal - Non-AI Glow) */
  --bg-main: #0c1017;
  --bg-surface: #141a24;
  --bg-surface-hover: #1b2331;
  --bg-input: #10151f;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Authentic Journalistic Colors */
  --primary: #2563eb;          /* Editorial Royal Blue */
  --primary-hover: #1d4ed8;
  --accent-red: #dc2626;        /* Breaking / Top Headline Red */
  --accent-red-subtle: rgba(220, 38, 38, 0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-elevated: 0 12px 28px rgba(0, 0, 0, 0.35);

  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s ease-out;
}

/* Light Theme (Clean Crisp Newspaper Quality) */
body.light-theme {
  --bg-main: #ffffff;
  --bg-surface: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;

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

  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 12px 28px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea, select {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Navbar & Header
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
  transition: background var(--transition-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.logo-mark {
  background: var(--accent-red);
  color: #fff;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
  letter-spacing: normal;
}

.logo-icon-img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: transform var(--transition-fast);
}

.logo:hover .logo-icon-img {
  transform: scale(1.05);
}

.search-box {
  position: relative;
  width: 260px;
}

.search-box input {
  width: 100%;
  padding: 0.45rem 0.85rem 0.45rem 2.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Standard Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

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

.btn-outline:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-secondary);
}

/* ==========================================================================
   Categories Bar (Clean Editorial Strip)
   ========================================================================== */
.categories-bar {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  overflow-x: auto;
  white-space: nowrap;
}

.category-pills {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.category-pill {
  padding: 0.35rem 0.85rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.category-pill:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.category-pill.active {
  color: #fff;
  background: var(--primary);
}

body.light-theme .category-pill.active {
  color: #fff;
  background: var(--primary);
}

/* ==========================================================================
   Running News Ticker (Teks Berjalan Berita Hot)
   ========================================================================== */
.news-ticker-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
}

.news-ticker-container {
  display: flex;
  align-items: center;
  height: 42px;
  position: relative;
}

.ticker-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-red);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-right: 0.85rem;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
  text-transform: uppercase;
}

.ticker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
  animation: tickerDotPulse 1.4s ease-in-out infinite;
}

@keyframes tickerDotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

.ticker-marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20px, black calc(100% - 20px), transparent 100%);
}

.ticker-marquee-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerScrollLeft 55s linear infinite;
  will-change: transform;
}

.ticker-marquee-wrapper:hover .ticker-marquee-track {
  animation-play-state: paused;
}

@keyframes tickerScrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.ticker-item:hover .ticker-title {
  color: var(--primary);
  text-decoration: underline;
}

.ticker-category {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.ticker-title {
  font-weight: 700;
  color: var(--text-primary);
}

.ticker-separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.ticker-summary {
  color: var(--text-secondary);
  font-weight: 400;
}

.ticker-bullet {
  color: var(--accent-red);
  margin-left: 1rem;
  font-size: 0.9rem;
}


/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
}

.breadcrumb-nav a:hover {
  color: var(--primary);
}

.breadcrumb-nav .divider {
  font-size: 0.65rem;
  opacity: 0.4;
}

.breadcrumb-nav .current-crumb {
  color: var(--text-muted);
  max-width: 450px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   DETAIL BERITA: 2-Column Editorial Grid Layout
   ========================================================================== */
.article-page-container {
  padding-top: 1.75rem;
  padding-bottom: 4rem;
}

.article-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: start;
}

/* Left Main Column */
.article-main-col {
  min-width: 0;
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-category-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.article-headline {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.meta-info-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.meta-dot {
  opacity: 0.4;
}

/* Small, Compact Share Buttons (Area Kecil & Rapi) */
.share-mini-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-share-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.4;
}

.btn-share-compact:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: var(--bg-surface-hover);
}

.btn-share-compact.btn-share-wa:hover {
  color: #25D366;
  border-color: #25D366;
}

/* Main Article Image */
.article-figure {
  margin: 1.75rem 0 2rem 0;
}

.article-main-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.article-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Lead Summary Paragraph */
.article-lead {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 2rem;
}

/* Rich Article Body */
.article-body {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 1.6rem;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1.6rem 1.75rem;
}

.article-body li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.article-body blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--text-muted);
  background: var(--bg-surface);
  font-style: italic;
  color: var(--text-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* Small Share Strip at Bottom */
.article-share-strip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0;
  margin-top: 2.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.share-strip-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 0.25rem;
}

/* ==========================================================================
   SIDEBAR: TOP 5 BERITA BERDASARKAN VIEWS
   ========================================================================== */
.article-sidebar {
  min-width: 0;
}

.sidebar-sticky {
  position: sticky;
  top: 85px;
}

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.indicator-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  display: inline-block;
}

.sidebar-badge-rank {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-red);
  background: var(--accent-red-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

/* Popular List Items */
.popular-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.popular-card:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.popular-card.is-active {
  opacity: 0.5;
}

.popular-number {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  min-width: 24px;
}

.popular-number.rank-first {
  color: var(--accent-red);
}

.popular-details {
  flex: 1;
  min-width: 0;
}

.popular-cat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.2rem;
}

.popular-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.popular-title:hover {
  color: var(--primary);
}

.popular-meta-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Sidebar Categories Quick Tags */
.sidebar-categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-cat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.sidebar-cat-pill:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

.sidebar-cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   Related News Section
   ========================================================================== */
.related-section {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-section-header {
  margin-bottom: 1.5rem;
}

.related-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.related-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.related-news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast);
}

.related-news-card:hover {
  transform: translateY(-3px);
}

.related-thumb-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-news-card:hover .related-thumb {
  transform: scale(1.05);
}

.related-news-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.related-news-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.related-news-headline {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  flex: 1;
}

.related-news-headline a:hover {
  color: var(--primary);
}

.related-news-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================================================
   HOMEPAGE: Hero & News Index Grid
   ========================================================================== */
.page-content {
  padding-top: 1.75rem;
  padding-bottom: 4rem;
}

.editorial-hero {
  margin-bottom: 3.5rem;
}

.hero-two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 1fr;
  gap: 2rem;
  align-items: stretch;
}

/* Hero Main Story */
.hero-main-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-img-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-card:hover .hero-img {
  transform: scale(1.03);
}

.hero-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-tag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.editorial-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-red);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.editorial-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.32;
  margin-bottom: 0.75rem;
}

.hero-title a:hover {
  color: var(--primary);
}

.hero-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Hero Trending Right Column */
.hero-trending-col {
  min-width: 0;
}

.trending-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.trending-header {
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.trending-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trending-list-items {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  gap: 1rem;
}

.trending-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

.trending-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-rank-num {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  min-width: 22px;
}

.trending-row:first-child .trending-rank-num {
  color: var(--accent-red);
}

.trending-text-block {
  flex: 1;
  min-width: 0;
}

.trending-cat-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.2rem;
}

.trending-row-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.trending-row-title a:hover {
  color: var(--primary);
}

.trending-meta-row {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* News Index Section */
.news-index-section {
  margin-top: 2.5rem;
}

.section-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border-color);
}

.index-heading {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.active-category-name {
  color: var(--primary);
  text-transform: capitalize;
}

/* Clean Cards Grid */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.75rem;
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

body.light-theme .article-card:hover {
  border-color: #cbd5e1;
}

.card-thumb-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .card-thumb-img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-top-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-cat-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
}

.card-headline-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--accent-red);
  color: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a:hover {
  color: var(--primary);
}

.card-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-meta-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-share-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-share-icon:hover {
  color: var(--primary);
}

.empty-state-box {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.empty-state-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Admin Dashboard & Management
   ========================================================================== */
.admin-container {
  padding: 2rem 0 4rem 0;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

.table th, .table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.table-img {
  width: 56px;
  height: 38px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1.25rem;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  padding: 1.75rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideIn 0.25s ease-out;
}

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

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .article-layout-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .sidebar-sticky {
    position: static;
  }

  .hero-two-columns {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .search-box {
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
  }

  .article-headline {
    font-size: 1.65rem;
  }

  .hero-title {
    font-size: 1.35rem;
  }

  .news-cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   News Detail Blur & Location Permission Gate Overlay
   ========================================================================== */
.article-blur-container {
  transition: filter 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.45s ease;
}

.article-blur-container.is-blurred {
  filter: blur(5.5px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  opacity: 0.88;
}

.location-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 23, 0.48);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding: 1.5rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.light-theme .location-gate-overlay {
  background: rgba(248, 250, 252, 0.55);
}

.location-gate-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.location-gate-card {
  max-width: 480px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  animation: gateCardSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes gateCardSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gate-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.25rem;
}

.gate-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.gate-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-gate-action {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-gate-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

.gate-footer-note {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Regional Personalization Feature Badges */
.region-feature-badges {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.85rem 0 1.25rem;
  flex-wrap: wrap;
}

.region-feature-badges span {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(37, 99, 235, 0.08);
  color: #3b82f6;
  border: 1px solid rgba(37, 99, 235, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

body.light-theme .region-feature-badges span {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.25);
}

/* Welcoming Reader Regional Synchronization Notice */
.mandatory-notice {
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin: 0.25rem 0 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  animation: noticeFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes noticeFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.light-theme .mandatory-notice {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.mandatory-notice-icon {
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1.2;
  flex-shrink: 0;
  margin-top: 2px;
}

.mandatory-notice-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

body.light-theme .mandatory-notice-title {
  color: #1d4ed8;
}

.mandatory-notice-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

body.light-theme .mandatory-notice-desc {
  color: #334155;
}

/* Cloudflare-Style Security Gate Card & Interactive Checkbox */
.security-check-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  margin: 1.1rem 0 0.85rem;
  box-shadow: var(--shadow-sm);
}

.security-check-box:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.04);
}

.security-check-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.security-check-square {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.security-check-box.loading .security-check-square {
  border-color: var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: checkSpin 0.75s linear infinite;
  color: transparent;
}

.security-check-box.checked .security-check-square {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

@keyframes checkSpin {
  to { transform: rotate(360deg); }
}

.security-check-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.security-check-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.security-check-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.75;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.security-check-right i {
  font-size: 1.35rem;
  color: #f97316;
  margin-bottom: 2px;
}

/* Floating Guided Pointer Arrow pointing to Chrome's dialog */
.floating-permission-guide {
  position: fixed;
  z-index: 100000;
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  padding: 0.75rem 1.35rem;
  border-radius: 9999px;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.35);
  font-size: 0.88rem;
  font-weight: 600;
  pointer-events: none;
  animation: guidePulse 1.2s ease-in-out infinite;
}

@media (min-width: 769px) {
  .floating-permission-guide {
    top: 24px;
    left: 48px;
  }
}

@media (max-width: 768px) {
  .floating-permission-guide {
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 380px;
    text-align: center;
    justify-content: center;
    border-radius: var(--radius-md);
  }
}

@keyframes guidePulse {
  0% {
    transform: translateY(0) scale(1);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.25);
  }
  50% {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.6), 0 0 0 5px rgba(255, 255, 255, 0.45);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.25);
  }
}

/* ==========================================================================
   Admin Dashboard Light Theme Enhancements
   ========================================================================== */
body.light-theme .admin-header h1 {
  color: #0f172a;
}

body.light-theme .table th {
  background: #f1f5f9;
  color: #475569;
  border-bottom-color: #e2e8f0;
}

body.light-theme .table td {
  border-bottom-color: #e2e8f0;
}

body.light-theme .table tbody tr:hover {
  background: #f8fafc;
}

body.light-theme .table-responsive {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .stat-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .stat-val {
  color: #0f172a;
}

body.light-theme .modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
}

body.light-theme .modal-content {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

body.light-theme .form-control {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body.light-theme .admin-tabs {
  border-bottom-color: #e2e8f0;
}

body.light-theme .tab-btn {
  color: #64748b;
}

body.light-theme .tab-btn:hover {
  color: #0f172a;
}

body.light-theme .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ==========================================================================
   Admin Sidebar Layout & SaaS Dashboard Architecture
   ========================================================================== */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-main);
  position: relative;
}

/* Sidebar Backdrop (Mobile overlay) */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 990;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
  display: block;
  opacity: 1;
}

/* Left Sidebar */
.admin-sidebar {
  width: 260px;
  min-width: 260px;
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem 0 1.25rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
}

.sidebar-header .logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  gap: 0.5rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.sidebar-header .logo-icon-img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  color: #ffffff !important;
  text-transform: uppercase;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-left: 0.25rem;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.35);
  flex-shrink: 0;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
}

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

/* Sidebar Profile Widget */
.sidebar-profile {
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.profile-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.15);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 2px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* Navigation Links */
.sidebar-nav {
  flex: 1;
  padding: 1.15rem 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-group-title {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 0.75rem 0.75rem 0.35rem;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-link .link-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-link i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  opacity: 0.85;
}

.sidebar-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: rgba(37, 99, 235, 0.12);
  color: #3b82f6;
  border-color: rgba(37, 99, 235, 0.25);
  font-weight: 600;
}

.sidebar-link.active i {
  color: #3b82f6;
}

.sidebar-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-input);
  color: var(--text-muted);
}

.sidebar-link.active .sidebar-badge {
  background: #3b82f6;
  color: #ffffff;
}

.sidebar-badge.highlight {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.sidebar-btn-action {
  width: 100%;
  margin: 0.5rem 0 0.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border: none;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: all 0.2s ease;
}

.sidebar-btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.sidebar-theme-toggle:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.sidebar-logout-btn {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.75rem;
  color: var(--accent-rose);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.sidebar-logout-btn:hover {
  background: rgba(244, 63, 94, 0.18);
}

/* Main Content Wrapper */
.admin-main-wrapper {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

/* Topbar */
.admin-topbar {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.crumb-root {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.crumb-separator {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.crumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Content Area */
.admin-content-area {
  padding: 1.75rem 2rem 3rem;
  width: 100%;
  box-sizing: border-box;
}

/* Desktop Collapsed Sidebar State */
@media (min-width: 992px) {
  .admin-layout.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-layout.sidebar-collapsed .admin-main-wrapper {
    margin-left: 0;
  }
}

/* Responsive Media Queries (Tablet & Mobile) */
@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.show {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.6);
  }

  .admin-main-wrapper {
    margin-left: 0;
  }

  .sidebar-close-btn {
    display: flex;
  }

  .admin-topbar {
    padding: 0 1.25rem;
  }

  .admin-content-area {
    padding: 1.25rem 1rem 2.5rem;
  }

  .hide-mobile {
    display: none;
  }
}

@media (max-width: 768px) {
  .admin-topbar {
    height: 58px;
    padding: 0 0.85rem;
  }

  .topbar-breadcrumb {
    font-size: 0.8rem;
  }

  .crumb-root,
  .crumb-separator {
    display: none;
  }

  .admin-content-area {
    padding: 1rem 0.75rem 2.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .stat-card {
    padding: 0.85rem;
    gap: 0.65rem;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .stat-val {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .stats-grid > .stat-card:last-child:nth-child(odd) {
    grid-column: span 2;
  }

  .table th, .table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid > .stat-card:last-child:nth-child(odd) {
    grid-column: span 1;
  }
}

/* Light Theme Enhancements for Sidebar */
body.light-theme .admin-sidebar {
  background: #ffffff;
  border-right-color: #e2e8f0;
}

body.light-theme .admin-topbar {
  background: #ffffff;
  border-bottom-color: #e2e8f0;
}

body.light-theme .sidebar-header {
  border-bottom-color: #e2e8f0;
}

body.light-theme .sidebar-profile {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body.light-theme .sidebar-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body.light-theme .sidebar-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light-theme .sidebar-link.active {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

/* Realtime Update Indicator & Row Highlight Animations */
.sidebar-badge.pulse {
  animation: badgePulse 0.8s ease-in-out;
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); box-shadow: 0 0 12px rgba(37, 99, 235, 0.6); }
  100% { transform: scale(1); }
}

.stat-val.pulse {
  animation: statValPulse 0.8s ease-in-out;
}

@keyframes statValPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); color: #10b981; }
  100% { transform: scale(1); }
}

.realtime-new-row {
  animation: newRowHighlight 2.5s ease-out;
}

@keyframes newRowHighlight {
  0% {
    background-color: rgba(16, 185, 129, 0.28);
    transform: translateY(-8px);
  }
  30% {
    background-color: rgba(16, 185, 129, 0.2);
    transform: translateY(0);
  }
  100% {
    background-color: transparent;
  }
}

.realtime-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: liveDotPulse 2s infinite;
  margin-right: 4px;
}

@keyframes liveDotPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}


