/* ========================================
   VARIABEL & RESET
   ======================================== */
:root {
    --ah-bg: #f6f8fb;
    --ah-bg-card: #ffffff;
    --ah-bg-hero: #0d1b2a;
    --ah-text: #1a2233;
    --ah-text-muted: #6b7280;
    --ah-border: #e5e9f0;
    --ah-primary: #1e88e5;
    --ah-primary-hover: #1565c0;
    --ah-success: #10b981;
    --ah-danger: #ef4444;
    --ah-radius: 16px;
    --ah-radius-sm: 10px;
    --ah-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --ah-shadow-lg: 0 20px 40px -12px rgba(13, 27, 42, .25);
    --ah-container: 1140px;
    --ah-header-h: 68px;
}

/* Dark mode */
html.ah-dark {
    --ah-bg: #0b1220;
    --ah-bg-card: #131c2e;
    --ah-bg-hero: #060d1a;
    --ah-text: #e6ebf5;
    --ah-text-muted: #94a3b8;
    --ah-border: #1f2a40;
    --ah-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --ah-shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, .6);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ah-text);
    background: var(--ah-bg);
    -webkit-font-smoothing: antialiased;
    transition: background .25s ease, color .25s ease;
}

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

a { color: var(--ah-primary); text-decoration: none; }
a:hover { color: var(--ah-primary-hover); }

.ah-container {
    width: 100%;
    max-width: var(--ah-container);
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(1px,1px,1px,1px);
    white-space: nowrap;
}

/* ========================================
   HEADER
   ======================================== */
.ah-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ah-bg-card);
    border-bottom: 1px solid var(--ah-border);
    backdrop-filter: saturate(180%) blur(8px);
}

.ah-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--ah-header-h);
}

.ah-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ah-text);
    font-weight: 800;
    letter-spacing: .3px;
}

.ah-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--ah-bg-hero);
    color: #fff;
}

.ah-logo-text {
    font-size: 17px;
    text-transform: uppercase;
}

/* Navigasi desktop */
.ah-nav { flex: 1; display: flex; justify-content: center; }

.ah-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0; padding: 0;
}

.ah-menu li a {
    display: block;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--ah-text-muted);
    font-weight: 500;
    font-size: 14.5px;
    transition: background .15s, color .15s;
}

.ah-menu li a:hover { background: var(--ah-bg); color: var(--ah-text); }

.ah-menu li.current-menu-item a,
.ah-menu li.current_page_item a {
    background: #e3f1fd;
    color: var(--ah-primary);
    font-weight: 600;
}

html.ah-dark .ah-menu li.current-menu-item a,
html.ah-dark .ah-menu li.current_page_item a {
    background: rgba(30, 136, 229, .18);
}

/* Aksi kanan */
.ah-actions { display: flex; align-items: center; gap: 8px; }

.ah-theme-toggle {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--ah-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
}

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

.ah-icon-sun { display: none; }
html.ah-dark .ah-icon-moon { display: none; }
html.ah-dark .ah-icon-sun { display: block; }

/* Tombol */
.ah-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}

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

.ah-btn-ghost { color: var(--ah-text); }
.ah-btn-ghost:hover { background: var(--ah-bg); color: var(--ah-text); }

/* Hamburger */
.ah-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px; height: 38px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}
.ah-hamburger span {
    display: block;
    height: 2px;
    width: 20px;
    margin: 0 auto;
    background: var(--ah-text);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
.ah-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ah-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ah-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile */
.ah-mobile-nav {
    display: none;
    border-top: 1px solid var(--ah-border);
    background: var(--ah-bg-card);
    padding: 12px 20px 20px;
}
.ah-mobile-nav.is-open { display: block; }

.ah-mobile-menu { list-style: none; margin: 0 0 12px; padding: 0; }
.ah-mobile-menu li a {
    display: block;
    padding: 12px 8px;
    border-radius: 8px;
    color: var(--ah-text);
    font-weight: 500;
}
.ah-mobile-menu li a:hover { background: var(--ah-bg); }

.ah-mobile-actions { display: flex; flex-direction: column; gap: 8px; }

/* Main */
.ah-main { min-height: 60vh; }

/* ========================================
   FOOTER
   ======================================== */
.ah-footer {
    margin-top: 60px;
    background: var(--ah-bg-card);
    border-top: 1px solid var(--ah-border);
}

.ah-footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 48px 20px 32px;
}

.ah-footer-brand .ah-logo-text {
    display: block;
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 8px;
}

.ah-footer-desc { color: var(--ah-text-muted); font-size: 14px; margin: 0; }

.ah-footer-col h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 12px;
    color: var(--ah-text);
}

.ah-footer-col ul { list-style: none; margin: 0; padding: 0; }
.ah-footer-col li { margin-bottom: 8px; }
.ah-footer-col a { color: var(--ah-text-muted); font-size: 14px; }
.ah-footer-col a:hover { color: var(--ah-primary); }

.ah-footer-bottom {
    border-top: 1px solid var(--ah-border);
    padding: 16px 0;
    font-size: 13px;
    color: var(--ah-text-muted);
}
.ah-footer-bottom .ah-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.ah-footer-tz { opacity: .8; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 960px) {
    .ah-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 860px) {
    .ah-nav, .ah-actions .ah-btn, .ah-actions .ah-theme-toggle { display: none; }
    .ah-hamburger { display: flex; }
}

@media (max-width: 560px) {
    .ah-footer-inner { grid-template-columns: 1fr; }
    .ah-logo-text { font-size: 15px; }
}

/* ========================================
   BERANDA
   ======================================== */

/* Info waktu server */
.ah-server-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ah-bg-card);
    border: 1px solid var(--ah-border);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 13.5px;
    color: var(--ah-text-muted);
    margin: 24px auto 20px;
}

.ah-server-time strong { color: var(--ah-text); }

/* Hero */
.ah-hero {
    background: var(--ah-bg-hero);
    color: #fff;
    border-radius: 24px;
    padding: 56px 24px 48px;
    text-align: center;
    box-shadow: var(--ah-shadow-lg);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.ah-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    letter-spacing: 3px;
    color: #7dd3fc;
    font-weight: 700;
    margin-bottom: 18px;
}

.ah-hero-date {
    font-size: 22px;
    color: #cbd5e1;
    font-weight: 500;
    margin-bottom: 24px;
}

.ah-hero-number {
    font-size: clamp(72px, 14vw, 160px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 8px;
    color: #fff;
    text-shadow: 0 0 60px rgba(125, 211, 252, .35);
    margin: 8px 0 28px;
    font-variant-numeric: tabular-nums;
}

.ah-hero-empty {
    font-size: 22px;
    color: #fbbf24;
    padding: 40px 0;
}

.ah-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 136, 229, .18);
    color: #7dd3fc;
    border: 1px solid rgba(125, 211, 252, .3);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 40px;
}

.ah-copy-btn:hover { background: rgba(30, 136, 229, .3); }
.ah-copy-btn.is-copied { background: var(--ah-success); color: #fff; border-color: var(--ah-success); }

.ah-countdown-label {
    font-size: 12.5px;
    letter-spacing: 4px;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 600;
}

.ah-countdown {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 4px;
    font-variant-numeric: tabular-nums;
    color: #fff;
}

.ah-countdown-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 10px;
}

/* Stat cards */
.ah-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.ah-stat-card {
    background: var(--ah-bg-card);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    padding: 22px 20px;
    text-align: center;
    box-shadow: var(--ah-shadow);
}

.ah-stat-label {
    font-size: 11.5px;
    letter-spacing: 2px;
    color: var(--ah-text-muted);
    font-weight: 700;
    margin-bottom: 10px;
}

.ah-stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--ah-text);
    font-variant-numeric: tabular-nums;
}

.ah-stat-status {
    font-size: 15px;
    color: var(--ah-success);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.ah-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--ah-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
}

/* Section head */
.ah-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.ah-section-head h2 {
    font-size: 26px;
    margin: 0 0 4px;
    font-weight: 800;
}

.ah-section-head p {
    margin: 0;
    color: var(--ah-text-muted);
    font-size: 14.5px;
}

.ah-btn-light {
    background: var(--ah-bg);
    color: var(--ah-text);
    border: 1px solid var(--ah-border);
}
.ah-btn-light:hover { background: var(--ah-bg-card); }

/* History */
.ah-history { margin-bottom: 48px; }

.ah-history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ah-history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--ah-bg-card);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius-sm);
    padding: 14px 18px;
    box-shadow: var(--ah-shadow);
    transition: transform .15s, box-shadow .15s;
}

.ah-history-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px -6px rgba(16, 24, 40, .12);
}

.ah-history-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ah-bg);
    border-radius: 10px;
    color: var(--ah-text-muted);
}

.ah-history-body { flex: 1; min-width: 0; }

.ah-history-date {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--ah-text);
}

.ah-history-status {
    font-size: 12px;
    color: var(--ah-text-muted);
    margin-top: 2px;
}

.ah-history-number {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--ah-text);
    font-variant-numeric: tabular-nums;
}

.ah-history-copy {
    background: transparent;
    border: none;
    color: var(--ah-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.ah-history-copy:hover { background: var(--ah-bg); color: var(--ah-primary); }

/* Info cards */
.ah-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.ah-info-card {
    background: var(--ah-bg-card);
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    padding: 28px 26px;
    box-shadow: var(--ah-shadow);
}

.ah-info-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
}

.ah-info-card ul {
    margin: 0; padding-left: 20px;
    color: var(--ah-text-muted);
    font-size: 14.5px;
}
.ah-info-card li { margin-bottom: 8px; }
.ah-info-card p {
    color: var(--ah-text-muted);
    font-size: 14.5px;
    margin: 0 0 18px;
}

/* Responsive beranda */
@media (max-width: 860px) {
    .ah-hero { padding: 40px 18px 36px; border-radius: 20px; }
    .ah-hero-number { letter-spacing: 4px; }
    .ah-countdown { font-size: 32px; letter-spacing: 2px; }
    .ah-stats { grid-template-columns: 1fr; }
    .ah-history-grid { grid-template-columns: 1fr; }
    .ah-info-grid { grid-template-columns: 1fr; }
    .ah-section-head { flex-direction: column; align-items: flex-start; }
}