@font-face {
    font-family: IskolaPotha;
    src: url('../lib/iskpota.ttf');
}

:root {
    --navy-950: #0b192c;
    --navy-900: #13294b;
    --navy-800: #1e4273;
    --gold-500: #d97706;
    --gold-400: #f59e0b;
    --gold-100: #fef3c7;
    --gold-50: #fffbeb;
    --sky-500: #0284c7;
    --sky-600: #0369a1;
    --bg-page: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #475569;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg-page);
    color: var(--text-main);
    font-family: 'Noto Sans Sinhala', IskolaPotha, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* Navbar */
.hd-nav {
    background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-900) 60%, var(--navy-800) 100%);
    color: #fff;
    padding: 12px 24px;
    box-shadow: 0 2px 12px rgba(11, 25, 44, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.hd-nav-inner {
    max-width: 1220px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hd-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.25rem;
}

.hd-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.hd-nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.hd-nav-links a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.hd-nav-links a:hover, .hd-nav-links a.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* Main container & cards */
.hd-container {
    max-width: 1220px;
    margin: 24px auto 48px;
    padding: 0 18px;
}

.hd-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 20px;
}

.hd-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.hd-card-header h2, .hd-card-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy-950);
}

.hd-subtitle {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Buttons */
.hd-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.hd-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
}

.hd-btn-primary {
    background: linear-gradient(135deg, var(--sky-500), var(--sky-600));
    border-color: var(--sky-600);
    color: #fff !important;
}

.hd-btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    border-color: #075985;
}

.hd-btn-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    border-color: var(--gold-500);
    color: #fff !important;
}

.hd-btn-gold:hover {
    filter: brightness(0.95);
}

.hd-btn-lg {
    padding: 12px 28px;
    font-size: 1rem;
}

/* Grid & form elements */
.hd-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 860px) {
    .hd-grid-2 {
        grid-template-columns: 1fr;
    }
}

.hd-section-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
}

.hd-section-title {
    margin: 0 0 14px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hd-field {
    margin-bottom: 14px;
}

.hd-field label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.hd-input, .hd-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hd-input:focus, .hd-select:focus {
    outline: none;
    border-color: var(--sky-500);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.hd-row-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hd-row-inline .hd-select, .hd-row-inline .hd-input {
    width: auto;
    flex: 1 1 70px;
}

.hd-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

/* Clock tabs */
.hd-clock-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.hd-clock-tab {
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.hd-clock-tab.active {
    background: var(--navy-900);
    color: #fff;
}

.hd-clock-pane { display: none; }
.hd-clock-pane.active { display: block; }

/* Interactive Map */
#hadahan-map {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin-top: 10px;
    background: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.hd-map-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-weight: 600;
}

.hd-map-badge.google {
    background: #dcfce7;
    color: #166534;
}

/* Report Tabs & Summaries */
.hd-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.hd-stat {
    background: var(--gold-50);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 12px 14px;
}

.hd-stat-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #92400e;
    font-weight: 600;
}

.hd-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy-950);
    margin-top: 2px;
}

.hd-badges-box {
    background: #f8fafc;
    border-left: 4px solid var(--gold-500);
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 18px;
    line-height: 1.8;
}

.nav-tabs {
    border-bottom: 2px solid var(--border);
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-tabs > li > a {
    border-radius: 8px 8px 0 0 !important;
    color: var(--text-muted);
    font-weight: 600;
    border: 1px solid transparent !important;
    padding: 10px 16px !important;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    background: var(--navy-900) !important;
    color: #fff !important;
    border-color: var(--navy-900) !important;
}

.hd-report-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 16px;
}

.hd-report-section h2, .hd-report-section h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--navy-900);
    font-size: 1.2rem;
    font-weight: 700;
}

.porondam-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
    color: #fff;
    margin-bottom: 20px;
}

.porondam-score {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--gold-400);
    line-height: 1.1;
}

@media print {
    .no-print, .hd-nav { display: none !important; }
    body { background: #fff !important; }
    .hd-card, .hd-report-section { box-shadow: none !important; border: 1px solid #cbd5e1 !important; }
    .tab-pane { display: block !important; opacity: 1 !important; margin-bottom: 20px; page-break-inside: avoid; }
}
