/* Online Birth and Death Certificate System - Main Stylesheet */

:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8e;
    --primary-dark: #0f2744;
    --secondary: #c9a227;
    --accent: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light-bg: #f4f7fb;
    --card-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --sidebar-width: 260px;
    --topbar-height: 65px;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: var(--light-bg);
    line-height: 1.6;
}

/* Public Site */
.public-nav {
    background: var(--primary);
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.public-nav .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff !important;
}

.public-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.public-nav .nav-link:hover { color: var(--secondary) !important; }

.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.section-padding { padding: 80px 0; }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #666;
    margin-bottom: 3rem;
}

.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
    border-top: 4px solid var(--primary);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.service-card.death { border-top-color: var(--secondary); }

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: rgba(30,58,95,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.notice-card {
    background: #fff;
    border-left: 4px solid var(--secondary);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    box-shadow: var(--card-shadow);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.contact-info-item i {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 60px 0 20px;
}

.site-footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.site-footer a:hover { color: var(--secondary); }

/* Panel Layout */
.panel-wrapper {
    display: flex;
    min-height: 100vh;
}

.panel-sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-brand h5 {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
}

.sidebar-brand small { opacity: 0.7; font-size: 0.75rem; }

.sidebar-nav { padding: 1rem 0; }

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: var(--secondary);
}

.sidebar-nav .nav-link i { width: 20px; text-align: center; }

.panel-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.panel-topbar {
    background: #fff;
    height: var(--topbar-height);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 999;
}

.panel-content { padding: 1.5rem; }

/* Dashboard Cards */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover { transform: translateY(-3px); }

.stat-card .stat-icon {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    color: #666;
    font-size: 0.875rem;
}

.bg-primary-soft { background: rgba(30,58,95,0.1); color: var(--primary); }
.bg-success-soft { background: rgba(40,167,69,0.1); color: var(--accent); }
.bg-warning-soft { background: rgba(255,193,7,0.15); color: #856404; }
.bg-danger-soft { background: rgba(220,53,69,0.1); color: var(--danger); }
.bg-info-soft { background: rgba(23,162,184,0.1); color: var(--info); }
.bg-dark-soft { background: rgba(52,58,64,0.1); color: #343a40; }

/* Cards & Tables */
.content-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}

.content-card .card-header {
    background: transparent;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.content-card .card-body { padding: 1.5rem; }

.table-responsive { border-radius: 8px; }

.table thead th {
    background: var(--light-bg);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.table tbody tr:hover { background: rgba(30,58,95,0.03); }

/* Forms */
.form-label { font-weight: 500; font-size: 0.9rem; }

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.6rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(30,58,95,0.15);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    padding: 2rem;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.auth-card-header {
    background: var(--primary);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.auth-card-body { padding: 2rem; }

.role-tabs .nav-link {
    color: var(--primary);
    border-radius: 8px;
    margin: 0 0.25rem;
    font-weight: 500;
}

.role-tabs .nav-link.active {
    background: var(--primary);
    color: #fff;
}

/* Certificate Print */
.certificate-page {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border: 3px double var(--primary);
    padding: 40px;
    position: relative;
}

.certificate-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.certificate-header h2 {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.certificate-seal {
    width: 80px;
    height: 80px;
    border: 3px solid var(--secondary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.cert-detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
}

.cert-detail-label {
    width: 200px;
    font-weight: 600;
    color: var(--primary);
}

.cert-detail-value { flex: 1; }

.certificate-footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.signature-line {
    border-top: 1px solid #333;
    width: 200px;
    text-align: center;
    padding-top: 5px;
    font-size: 0.85rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; }

/* Filter Bar */
.filter-bar {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Badge */
.badge { font-weight: 500; padding: 0.4em 0.75em; }

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
}

@media (max-width: 991px) {
    .panel-sidebar {
        transform: translateX(-100%);
    }
    .panel-sidebar.show { transform: translateX(0); }
    .panel-main { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .hero-title { font-size: 2rem; }
}

@media print {
    .no-print { display: none !important; }
    .panel-sidebar, .panel-topbar { display: none !important; }
    .panel-main { margin-left: 0 !important; }
    .certificate-page { border: 2px solid #000; }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show { display: flex; }

/* Chart placeholder */
.chart-container {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.bar-chart { display: flex; align-items: flex-end; gap: 1rem; height: 200px; padding-top: 1rem; }

.bar-group { flex: 1; text-align: center; }

.bar {
    border-radius: 4px 4px 0 0;
    margin: 0 auto;
    width: 30px;
    transition: height 0.5s ease;
}

.bar-label { font-size: 0.75rem; color: #666; margin-top: 0.5rem; }

.detail-view dt { font-weight: 600; color: var(--primary); }
.detail-view dd { margin-bottom: 0.75rem; }

.login-portal-card {
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.login-portal-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}
