/* NEXARENA v3 - Modern News Portal */
:root {
  --primary: #06B6D4;
  --primary-light: #22D3EE;
  --primary-dark: #0891B2;
  --accent: #A3E635;
  --accent-light: #BEF264;
  --accent-bright: #CCFF00;
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-input: #F1F5F9;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --shadow: 0 2px 12px rgba(6,182,212,0.08);
  --shadow-lg: 0 8px 32px rgba(6,182,212,0.12);
  --danger: #DC2626;
  --success: #00C896;
  --warning: #FFB800;
  --gradient: linear-gradient(135deg, #22D3EE 0%, #A3E635 100%);
  --gradient-soft: linear-gradient(135deg, rgba(34,211,238,0.08) 0%, rgba(163,230,53,0.08) 100%);
  --nav-bg: rgba(15,23,42,0.9);
  --breaking-red: #DC2626;
}

[data-theme="dark"] {
  --primary: #22D3EE;
  --primary-light: #67E8F9;
  --primary-dark: #06B6D4;
  --accent: #A3E635;
  --accent-light: #BEF264;
  --accent-bright: #CCFF00;
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-elevated: #334155;
  --bg-input: #1E293B;
  --text: #F1F5F9;
  --text-secondary: #CBD5E1;
  --text-muted: #64748B;
  --border: #334155;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --gradient: linear-gradient(135deg, #22D3EE 0%, #A3E635 100%);
  --gradient-soft: linear-gradient(135deg, rgba(34,211,238,0.12) 0%, rgba(163,230,53,0.08) 100%);
  --nav-bg: rgba(15,23,42,0.9);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  transition: background 0.3s, color 0.3s; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* HEADER */
.header { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.header-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 16px; }
.logo { display: flex; flex-direction: column; cursor: pointer; user-select: none; }
.logo-row { display: flex; align-items: center; font-size: 22px; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.logo-icon { width: 28px; height: 28px; margin-right: 8px; flex-shrink: 0; }
.logo-icon svg { width: 100%; height: 100%; }
.logo-nex { color: #F1F5F9; }
.logo-a { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo-rena { text-transform: lowercase; font-weight: 700; color: #94A3B8; }
.logo-tagline { font-size: 10px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: #94A3B8; margin-left: 36px; margin-top: -2px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.search-wrap { position: relative; }
.search-input { width: 200px; padding: 8px 12px 8px 36px; border: 1px solid rgba(255,255,255,0.15); border-radius: 20px; background: rgba(255,255,255,0.05); color: #F1F5F9; font-size: 13px; outline: none; transition: all 0.2s; }
.search-input::placeholder { color: #64748B; }
.search-input:focus { border-color: var(--primary); width: 260px; background: rgba(255,255,255,0.1); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #64748B; font-size: 14px; }
.clock-wrap { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; }
.clock-time { font-weight: 700; color: var(--primary-light); }
.clock-date { color: #64748B; font-size: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #F1F5F9; transition: all 0.2s; font-size: 16px; }
.icon-btn:hover { background: var(--primary); color: #0F172A; border-color: var(--primary); }
.nav { display: flex; gap: 4px; padding: 0 0 12px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item { padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: all 0.2s; color: #CBD5E1; border: 1px solid transparent; }
.nav-item:hover { color: var(--primary-light); }
.nav-item.active { background: var(--gradient); color: #0F172A; font-weight: 700; }

/* BREAKING NEWS - MERAH */
.ticker { background: var(--breaking-red); overflow: hidden; position: relative; display: flex; align-items: center; height: 40px; }
.ticker-label { background: #B91C1C; color: #fff; font-weight: 800; font-size: 12px; padding: 0 16px; height: 100%; display: flex; align-items: center; gap: 6px; white-space: nowrap; z-index: 2; flex-shrink: 0; }
.ticker-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
.ticker-label::after { content: ''; position: absolute; right: -20px; top: 0; bottom: 0; width: 20px; background: linear-gradient(to right, #B91C1C, transparent); z-index: 3; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.ticker-track { display: flex; gap: 48px; white-space: nowrap; animation: scroll-ticker 30s linear infinite; padding-left: 20px; color: #fff; font-size: 13px; font-weight: 500; flex: 1; overflow: hidden; min-width: 0; }
.ticker-track span { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ticker-track span::before { content: '•'; }
@keyframes scroll-ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* AD SLOTS */
.ad-slot { background: var(--bg-input); border: 1px dashed var(--border); border-radius: 12px; display: flex; align-items: center; justify-content: center; min-height: 90px; text-align: center; color: var(--text-muted); font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; position: relative; overflow: hidden; }
.ad-slot::before { content: 'IKLAN'; position: absolute; top: 4px; left: 8px; font-size: 8px; color: var(--text-muted); opacity: 0.5; }
.ad-header { width: 100%; max-width: 728px; margin: 16px auto; height: 90px; }
.ad-sidebar { width: 100%; height: 250px; }
.ad-inarticle { width: 100%; height: 120px; margin: 24px 0; }
.ad-footer { width: 100%; max-width: 970px; margin: 0 auto; height: 90px; }
.ad-article-top { width: 100%; height: 100px; margin: 16px 0; }
.ad-article-bottom { width: 100%; height: 100px; margin: 16px 0; }

/* SLIDER */
.slider { position: relative; border-radius: 16px; overflow: hidden; margin: 20px 0; box-shadow: var(--shadow-lg); }
.slider-track { display: flex; transition: transform 0.5s ease; }
.slider-slide { min-width: 100%; position: relative; aspect-ratio: 21/9; }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px 60px 24px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; }
.slider-overlay .badge { display: inline-block; padding: 4px 12px; border-radius: 20px; background: var(--accent); color: #000; font-size: 11px; font-weight: 800; margin-bottom: 10px; text-transform: uppercase; }
.slider-overlay h2 { font-size: 22px; font-weight: 800; line-height: 1.3; cursor: pointer; max-width: 80%; }
.slider-overlay p { font-size: 13px; opacity: 0.85; margin-top: 6px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(0,0,0,0.5); color: #fff; cursor: pointer; font-size: 18px; z-index: 5; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.slider-arrow:hover { background: var(--primary); }
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }
.slider-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 6px; z-index: 5; }
.slider-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.2s; }
.slider-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* HERO */
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin: 20px 0; }
.hero-main { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16/10; cursor: pointer; box-shadow: var(--shadow-lg); }
.hero-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.hero-main:hover img { transform: scale(1.05); }
.hero-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; }
.hero-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; background: var(--accent); color: #000; font-size: 11px; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; }
.hero-title { font-size: 24px; font-weight: 800; line-height: 1.3; }
.hero-meta { font-size: 12px; opacity: 0.8; margin-top: 8px; }
.hero-side { display: flex; flex-direction: column; gap: 12px; }
.hero-side-card { display: flex; gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; transition: background 0.2s; }
.hero-side-card:hover { background: var(--bg-card); }
.hero-side-img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.hero-side-info h4 { font-size: 14px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.hero-side-info .cat { font-size: 10px; color: var(--accent); font-weight: 700; text-transform: uppercase; }

/* ARTICLE GRID */
.section-title { display: flex; align-items: center; gap: 8px; margin: 32px 0 16px; font-size: 20px; font-weight: 800; }
.section-title::before { content: ''; width: 4px; height: 24px; border-radius: 4px; background: var(--gradient); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card { background: var(--bg-card); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: all 0.3s; border: 1px solid var(--border); }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.article-card-body { padding: 16px; }
.article-cat { display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.article-card-title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.article-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; }

/* LAYOUT - 12 Column Grid (8:4) */
.main-layout { display: grid; grid-template-columns: 8fr 4fr; gap: 32px; margin: 24px 0; }
.feed-main { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 120px; align-self: start; max-height: calc(100vh - 140px); overflow-y: auto; scrollbar-width: thin; }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-card { background: var(--bg-card); border-radius: 16px; padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.sidebar-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }

/* FEED LIST - Horizontal Article Cards */
.feed-list { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: all 0.2s; }
.feed-item:first-child { padding-top: 0; }
.feed-item:last-child { border-bottom: none; }
.feed-item:hover .feed-item-title { color: var(--primary); }
.feed-item-thumb { width: 200px; min-width: 200px; aspect-ratio: 16/9; border-radius: 12px; object-fit: cover; flex-shrink: 0; transition: transform 0.3s; }
.feed-item:hover .feed-item-thumb { transform: scale(1.03); }
.feed-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.feed-item-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; background: var(--gradient-soft); color: var(--primary); font-size: 10px; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; align-self: flex-start; }
.feed-item-title { font-size: 18px; font-weight: 800; line-height: 1.35; margin-bottom: 8px; color: var(--text); transition: color 0.2s; }
.feed-item-excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-item-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.feed-item-meta .author { font-weight: 600; color: var(--text-secondary); }
.feed-item-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }

/* TRENDING - Big Numbers */
.trending-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: all 0.2s; }
.trending-item:last-child { border-bottom: none; }
.trending-item:hover h4 { color: var(--primary); }
.trending-num { font-size: 32px; font-weight: 900; color: var(--primary); opacity: 0.25; min-width: 36px; line-height: 1; text-align: center; font-family: 'Plus Jakarta Sans', sans-serif; }
.trending-info { flex: 1; min-width: 0; }
.trending-info h4 { font-size: 13px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; transition: color 0.2s; }
.trending-info .cat { font-size: 10px; color: var(--accent); font-weight: 700; text-transform: uppercase; }

/* TOPIC PILLS */
.topic-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pill { padding: 6px 14px; border-radius: 20px; background: var(--bg-input); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.topic-pill:hover { background: var(--gradient); color: #fff; border-color: transparent; transform: translateY(-2px); }

.poll-option { padding: 12px 16px; border: 2px solid var(--border); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; font-size: 13px; font-weight: 600; }
.poll-option:hover { border-color: var(--primary); }
.poll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gradient-soft); z-index: 0; transition: width 0.5s; }
.poll-option span { position: relative; z-index: 1; }
.poll-pct { float: right; position: relative; z-index: 1; color: var(--primary); font-weight: 800; }

/* ARTICLE DETAIL */
.article-breadcrumb { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--text-muted); margin: 20px 0; flex-wrap: wrap; }
.article-breadcrumb a { color: var(--primary); font-weight: 600; }
.article-detail { max-width: 800px; margin: 0 auto; }
.article-detail-cat { display: inline-block; padding: 4px 14px; border-radius: 20px; background: var(--gradient); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; margin-bottom: 16px; }
.article-detail h1 { font-size: 32px; font-weight: 900; line-height: 1.25; margin-bottom: 12px; color: var(--text); }
.article-detail-meta { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.author-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.author-info .name { font-weight: 700; font-size: 14px; }
.author-info .time { font-size: 12px; color: var(--text-muted); }
.article-cover { width: 100%; border-radius: 16px; margin-bottom: 24px; }

/* ARTICLE CONTENT - HEADING SIZES */
.article-content { font-size: 17px; line-height: 1.8; color: var(--text-secondary); }
.article-content p { margin-bottom: 20px; }
.article-content h1 { font-size: 36px; font-weight: 900; color: var(--text); margin: 32px 0 16px; line-height: 1.3; }
.article-content h2 { font-size: 28px; font-weight: 800; color: var(--text); margin: 28px 0 12px; line-height: 1.35; }
.article-content h3 { font-size: 22px; font-weight: 700; color: var(--text); margin: 24px 0 10px; line-height: 1.4; }
.article-content h4 { font-size: 20px; font-weight: 700; color: var(--text); margin: 20px 0 8px; line-height: 1.4; }
.article-content img { border-radius: 12px; margin: 20px auto; max-width: 100%; height: auto; }
.article-content figure { margin: 20px 0; }
.article-content figure img { border-radius: 12px; width: 100%; }
.article-content figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 8px; font-style: italic; padding: 0 16px; }
.article-content .img-credit { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 4px; font-weight: 600; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; margin: 20px 0; background: var(--gradient-soft); border-radius: 0 12px 12px 0; font-style: italic; color: var(--text); }
.article-content ul, .article-content ol { margin: 16px 0 16px 24px; }
.article-content li { margin-bottom: 8px; }
.article-content a { color: var(--primary); text-decoration: underline; }
/* Override inline styles from execCommand that cause dark text */
.article-content span[style*="color"] { color: var(--text) !important; }
.article-content span[style*="font-size"] { /* keep font-size but override color */ }
.article-content div[style*="color"] { color: var(--text) !important; }
.article-content p[style*="color"] { color: var(--text-secondary) !important; }

/* IMAGE ALIGNMENT IN ARTICLE */
.article-content .img-left { float: left; margin: 8px 16px 8px 0; max-width: 50%; }
.article-content .img-right { float: right; margin: 8px 0 8px 16px; max-width: 50%; }
.article-content .img-center { display: flex; flex-direction: column; align-items: center; }
.article-content .img-full { width: 100%; }
.article-content .img-small { max-width: 40%; }
.article-content .img-medium { max-width: 60%; }
.article-content .img-large { max-width: 80%; }
.article-content::after { content: ''; display: table; clear: both; }

/* TTS BAR */
.tts-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--gradient-soft); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.tts-bar .label { font-size: 13px; font-weight: 700; color: var(--primary); }
.tts-btn { padding: 8px 16px; border-radius: 20px; border: none; cursor: pointer; font-size: 12px; font-weight: 700; transition: all 0.2s; }
.tts-play { background: var(--gradient); color: #fff; }
.tts-play:hover { opacity: 0.9; }
.tts-stop { background: var(--bg-input); color: var(--text); }
.tts-stop:hover { background: var(--danger); color: #fff; }
.tts-status { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* READING MODE */
body.reading-mode .header, body.reading-mode .ticker, body.reading-mode .nav, body.reading-mode .sidebar, body.reading-mode .ad-slot, body.reading-mode .footer, body.reading-mode #backToTop, body.reading-mode .related-articles, body.reading-mode .article-breadcrumb, body.reading-mode .share-bar, body.reading-mode .tts-bar { display: none !important; }
body.reading-mode { background: var(--bg) !important; }
body.reading-mode .article-detail { max-width: 700px; }
body.reading-mode .article-content { font-size: 19px; line-height: 2; color: var(--text-secondary) !important; background: transparent !important; }
body.reading-mode .article-content h1 { color: var(--text) !important; }
body.reading-mode .article-content h2 { color: var(--text) !important; }
body.reading-mode .article-content h3 { color: var(--text) !important; }
body.reading-mode .article-content h4 { color: var(--text) !important; }
body.reading-mode .article-content p { color: var(--text-secondary) !important; }
body.reading-mode .article-detail h1 { color: var(--text) !important; }

/* SHARE BAR */
.share-bar { display: flex; align-items: center; gap: 10px; padding: 16px 0; margin: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.share-bar .share-label { font-size: 14px; font-weight: 700; color: var(--text); margin-right: 8px; }
.share-btn { width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.share-btn:hover { transform: translateY(-2px); }
.share-btn svg { width: 18px; height: 18px; fill: #fff; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #000; }
.share-btn.telegram { background: #0088CC; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.email { background: #6B7280; }
.share-btn.copy { background: var(--primary); }
.share-btn.native { background: var(--accent); }
.share-btn.native svg { fill: #000; }

/* RELATED */
.related-articles { margin: 40px 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gradient); padding: 20px; position: relative; overflow: hidden; }
.login-card { background: var(--bg-card); border-radius: 24px; padding: 40px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative; z-index: 1; }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo h1 { font-size: 24px; font-weight: 900; }
.login-logo p { font-size: 12px; color: var(--text-muted); }
.login-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg-input); border-radius: 12px; padding: 4px; }
.login-tab { flex: 1; padding: 10px; text-align: center; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 700; transition: all 0.2s; color: var(--text-secondary); }
.login-tab.active { background: var(--bg-card); color: var(--primary); box-shadow: var(--shadow); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.form-input { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-input); color: var(--text); font-size: 14px; outline: none; transition: all 0.2s; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(6,182,212,0.1); }
.btn-primary { width: 100%; padding: 14px; border: none; border-radius: 10px; background: var(--gradient); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-social { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-social:hover { background: var(--bg-input); }
.divider { text-align: center; margin: 16px 0; font-size: 12px; color: var(--text-muted); position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border); }
.divider::before { left: 0; } .divider::after { right: 0; }
.login-error { color: var(--danger); font-size: 12px; margin-bottom: 12px; text-align: center; min-height: 18px; }
.login-info { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 16px; padding: 12px; background: var(--bg-input); border-radius: 8px; }

/* DASHBOARD */
.dash-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-sidebar { background: var(--bg-card); border-right: 1px solid var(--border); padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.dash-logo { padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.dash-nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; color: var(--text-secondary); border-left: 3px solid transparent; }
.dash-nav-item:hover { background: var(--bg-input); color: var(--primary); }
.dash-nav-item.active { background: var(--gradient-soft); color: var(--primary); border-left-color: var(--primary); }
.dash-main { padding: 24px; overflow-y: auto; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.dash-header h1 { font-size: 24px; font-weight: 800; }
.dash-user { display: flex; align-items: center; gap: 10px; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border-radius: 16px; padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.stat-card .value { font-size: 28px; font-weight: 900; margin-top: 4px; }
.stat-card .icon { float: right; font-size: 24px; opacity: 0.2; }

/* EDITOR */
.editor-card { background: var(--bg-card); border-radius: 16px; padding: 24px; border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 20px; }
.editor-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.rte-toolbar { display: flex; gap: 4px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--border); border-radius: 10px 10px 0 0; background: var(--bg-input); align-items: center; }
.rte-btn { padding: 6px 10px; border: none; border-radius: 6px; background: transparent; cursor: pointer; font-size: 14px; color: var(--text); transition: all 0.15s; min-width: 32px; display: flex; align-items: center; justify-content: center; }
.rte-btn:hover { background: var(--primary); color: #fff; }
.rte-btn.active { background: var(--primary); color: #fff; }
.rte-divider { width: 1px; height: 24px; background: var(--border); margin: 0 2px; }
.rte-select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text); font-size: 12px; cursor: pointer; outline: none; }
.rte-area { width: 100%; min-height: 400px; padding: 16px; border: 1px solid var(--border); border-top: none; border-radius: 0 0 10px 10px; background: var(--bg-card); color: var(--text); font-size: 16px; line-height: 1.8; outline: none; }
.rte-area:focus { border-color: var(--primary); }
.rte-area:empty::before { content: 'Mulai menulis artikel di sini...'; color: var(--text-muted); pointer-events: none; }
/* Editor heading styles - visible while editing */
.rte-area h1 { font-size: 36px; font-weight: 900; margin: 32px 0 16px; line-height: 1.3; color: var(--text); }
.rte-area h2 { font-size: 28px; font-weight: 800; margin: 28px 0 12px; line-height: 1.35; color: var(--text); }
.rte-area h3 { font-size: 22px; font-weight: 700; margin: 24px 0 10px; line-height: 1.4; color: var(--text); }
.rte-area h4 { font-size: 20px; font-weight: 700; margin: 20px 0 8px; line-height: 1.4; color: var(--text); }
.rte-area p { margin-bottom: 16px; line-height: 1.8; }
.rte-area ul, .rte-area ol { margin: 12px 0 12px 24px; }
.rte-area li { margin-bottom: 6px; }
.rte-area blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; margin: 20px 0; background: var(--gradient-soft); border-radius: 0 12px 12px 0; font-style: italic; color: var(--text); }
.rte-area figure { margin: 20px 0; }
.rte-area figure img { border-radius: 12px; width: 100%; }
.rte-area figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 8px; font-style: italic; }
.rte-area .img-credit { font-size: 12px; color: var(--text-muted); text-align: center; font-weight: 600; }
.rte-area img { max-width: 100%; height: auto; border-radius: 8px; }
.rte-area a { color: var(--primary); text-decoration: underline; }

.editor-actions { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.btn-outline { padding: 12px 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text); font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-save { padding: 12px 24px; border: none; border-radius: 10px; background: var(--bg-input); color: var(--text); font-weight: 600; cursor: pointer; }
.btn-publish { padding: 12px 24px; border: none; border-radius: 10px; background: var(--accent); color: #000; font-weight: 700; cursor: pointer; }
.btn-approve { padding: 12px 24px; border: none; border-radius: 10px; background: var(--success); color: #fff; font-weight: 700; cursor: pointer; }
.btn-reject { padding: 12px 24px; border: none; border-radius: 10px; background: var(--danger); color: #fff; font-weight: 700; cursor: pointer; }
.btn-danger { padding: 8px 16px; border: none; border-radius: 8px; background: var(--danger); color: #fff; font-weight: 600; cursor: pointer; font-size: 12px; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
.autosave-status { font-size: 12px; color: var(--text-muted); margin-left: auto; align-self: center; }

/* TABLE */
.article-table { width: 100%; border-collapse: collapse; }
.article-table th { text-align: left; padding: 12px; font-size: 12px; color: var(--text-muted); border-bottom: 1px solid var(--border); text-transform: uppercase; }
.article-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.status-badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status-published { background: rgba(0,200,150,0.15); color: var(--success); }
.status-pending { background: rgba(255,184,0,0.15); color: var(--warning); }
.status-draft { background: rgba(153,153,170,0.15); color: var(--text-muted); }
.status-rejected { background: rgba(220,38,38,0.15); color: var(--danger); }

/* USER MANAGEMENT */
.user-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); }
.user-row .info { flex: 1; }
.user-row .info .name { font-weight: 700; font-size: 14px; }
.user-row .info .email { font-size: 12px; color: var(--text-muted); }
.role-badge { padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.role-admin { background: var(--gradient); color: #fff; }
.role-wartawan { background: rgba(0,217,199,0.15); color: var(--accent); }
.role-pengunjung { background: var(--bg-input); color: var(--text-secondary); }
.history-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.history-item .device-icon { font-size: 20px; }
.history-item .info { flex: 1; }
.history-item .info .device { font-weight: 600; }
.history-item .info .time { font-size: 11px; color: var(--text-muted); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--bg-card); border-radius: 20px; padding: 28px; max-width: 500px; width: 100%; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 20px; font-weight: 800; margin-bottom: 20px; }
.modal-close { float: right; cursor: pointer; font-size: 24px; color: var(--text-muted); border: none; background: none; }

/* TOAST */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 24px; box-shadow: var(--shadow-lg); z-index: 300; font-size: 14px; font-weight: 600; transition: transform 0.3s; max-width: 90%; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* PUSH NOTIF */
.push-notif { position: fixed; top: 80px; right: 20px; z-index: 150; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow-lg); max-width: 320px; transform: translateX(400px); transition: transform 0.4s; border-left: 4px solid var(--primary); }
.push-notif.show { transform: translateX(0); }
.push-notif h4 { font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.push-notif p { font-size: 12px; color: var(--text-secondary); }

/* FOOTER */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 36px; height: 36px; border-radius: 10px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s; }
.footer-social a:hover { background: var(--gradient); color: #fff; }
.footer-col h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-secondary); padding: 4px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 12px; color: var(--text-muted); }
.footer-redaksi { font-size: 11px; color: var(--text-muted); margin-top: 12px; line-height: 1.8; }

/* BACK TO TOP */
#backToTop { position: fixed; bottom: 20px; right: 20px; z-index: 50; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--gradient); color: #fff; cursor: pointer; font-size: 18px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
#backToTop.show { opacity: 1; pointer-events: auto; }
#backToTop:hover { transform: translateY(-4px); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }

/* CHEVRON ANIMATION ( >> ) */
.chevron-anim { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; letter-spacing: -2px; }
.chevron-anim span { display: inline-block; animation: chevron-pulse 1.4s ease-in-out infinite; }
.chevron-anim span:nth-child(1) { animation-delay: 0s; }
.chevron-anim span:nth-child(2) { animation-delay: 0.2s; }
@keyframes chevron-pulse {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(3px); }
}

/* LOGO ICON ANIMATION ( >> ) */
.logo-icon { animation: chevron-slide 2s ease-in-out infinite; }
.logo-icon path:nth-child(1) { animation: chevron-pulse 1.4s ease-in-out infinite; }
.logo-icon path:nth-child(2) { animation: chevron-pulse 1.4s ease-in-out infinite; animation-delay: 0.2s; }
@keyframes chevron-slide {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}
.logo-chevron { font-size: 16px; margin-left: 6px; color: var(--accent-bright); }
.logo-chevron span { font-size: 16px; }

/* STATIC PAGES */
.static-page { max-width: 800px; margin: 0 auto; padding: 20px 0; }
.static-page h1 { font-size: 28px; font-weight: 800; margin-bottom: 20px; color: var(--text); }
.static-page h2 { font-size: 22px; font-weight: 700; margin: 24px 0 12px; color: var(--text); }
.static-page p { font-size: 16px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 16px; }
.static-page ul { margin: 16px 0 16px 24px; }
.static-page li { margin-bottom: 8px; color: var(--text-secondary); }

/* CATEGORY SECTIONS */
.cat-section { margin: 32px 0; }
.cat-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cat-section-title { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; }
.cat-section-title::before { content: ''; width: 4px; height: 24px; border-radius: 4px; background: var(--gradient); }
.cat-section-link { font-size: 13px; color: var(--primary); font-weight: 600; cursor: pointer; }
.cat-scroll { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll .article-card { min-width: 280px; max-width: 280px; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; overflow-y: visible; }
  .feed-item-thumb { width: 130px; min-width: 130px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .slider-overlay h2 { font-size: 20px; }
}
@media (max-width: 640px) {
  .header-top { flex-wrap: wrap; }
  .search-input { width: 140px; }
  .search-input:focus { width: 180px; }
  .clock-wrap { display: none; }
  .article-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-sidebar { position: fixed; left: -260px; z-index: 200; width: 240px; transition: left 0.3s; }
  .dash-sidebar.open { left: 0; }
  .dash-main { padding: 16px; }
  .dash-stats { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-detail h1 { font-size: 24px; }
  .hero-title { font-size: 18px; }
  .feed-item { flex-direction: column; gap: 12px; }
  .feed-item-thumb { width: 100%; min-width: 0; aspect-ratio: 16/9; }
  .slider-overlay { padding: 20px 50px 16px; }
  .slider-overlay h2 { font-size: 16px; max-width: 90%; }
  .slider-arrow { width: 32px; height: 32px; font-size: 14px; }
  .article-content h1 { font-size: 28px; }
  .article-content h2 { font-size: 24px; }
  .article-content h3 { font-size: 20px; }
  .article-content h4 { font-size: 18px; }
  .rte-area h1 { font-size: 28px; }
  .rte-area h2 { font-size: 24px; }
  .rte-area h3 { font-size: 20px; }
  .rte-area h4 { font-size: 18px; }
  .article-content .img-left, .article-content .img-right { float: none; max-width: 100%; margin: 8px 0; }
}
