/* ============================================
   style.css - Complete Stylesheet
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
    background: #f0f4f9;
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 15px;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, #0a2a5e, #1a4a8a);
    color: white;
    padding: 15px 0;
    border-bottom: 5px solid #ff9933;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.emblem {
    font-size: 2.8rem;
    color: #ffd700;
}

.logo-section h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo-section h1 span {
    color: #ff9933;
}

.tagline {
    background: rgba(255,255,255,0.15);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.3);
}

/* NAVIGATION */
.nav-bar {
    background: #0a1f3b;
    padding: 0;
    margin-top: 5px;
}

.nav-bar ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 5px;
}

.nav-bar ul li a {
    display: block;
    padding: 12px 22px;
    color: #e0e8f5;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: 0.3s;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}

.nav-bar ul li a:hover,
.nav-bar ul li a.active {
    background: #ff9933;
    color: #0a1f3b;
}

.nav-bar ul li a i {
    margin-right: 8px;
}

/* SECTIONS */
.section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    margin: 25px 0;
    display: none;
}

.section.active {
    display: block;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a2a5e;
    border-left: 6px solid #ff9933;
    padding-left: 18px;
    margin-bottom: 25px;
}

/* PYRAMID */
.pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.pyramid-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.gov-card {
    background: linear-gradient(145deg, #ffffff, #f0f4fa);
    border: 1px solid #dde4ed;
    border-radius: 12px;
    padding: 18px 24px;
    text-align: center;
    min-width: 140px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 5px solid #1a4a8a;
    flex: 1 1 auto;
}

.gov-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10);
}

.gov-card .icon {
    font-size: 2rem;
    color: #1a4a8a;
    margin-bottom: 5px;
}

.gov-card .title {
    font-weight: 700;
    font-size: 1rem;
    color: #0a2a5e;
}

.gov-card .sub {
    font-size: 0.75rem;
    color: #5e6f8d;
    margin-top: 3px;
}

.gov-card.elected {
    border-top-color: #28a745;
}
.gov-card.elected .icon {
    color: #28a745;
}
.gov-card.judiciary {
    border-top-color: #dc3545;
}
.gov-card.judiciary .icon {
    color: #dc3545;
}
.gov-card.police {
    border-top-color: #fd7e14;
}
.gov-card.police .icon {
    color: #fd7e14;
}

.connector-line {
    color: #a0b3cc;
    font-size: 1.2rem;
    font-weight: 300;
}

/* FORM */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #0a2a5e;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dde4ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
    background: #fafcff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1a4a8a;
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 74, 138, 0.1);
}

.btn {
    background: #0a2a5e;
    color: white;
    border: none;
    padding: 14px 34px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid #0a2a5e;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #ff9933;
    border-color: #ff9933;
    transform: scale(1.02);
}

.btn i {
    margin-right: 10px;
}

/* ID CARD */
.id-card-preview {
    background: linear-gradient(145deg, #f8faff, #e8edf6);
    border-radius: 16px;
    padding: 25px;
    border: 2px dashed #1a4a8a;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.id-card-preview .placeholder {
    color: #5e6f8d;
    font-size: 1rem;
    text-align: center;
}

.id-card-preview .placeholder i {
    font-size: 3.5rem;
    color: #a0b3cc;
    margin-bottom: 10px;
    display: block;
}

.generated-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    width: 100%;
    text-align: left;
    border-left: 8px solid #ff9933;
}

.generated-card .card-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.generated-card .card-header h3 {
    color: #0a2a5e;
}

.generated-card .card-header .badge {
    background: #28a745;
    color: white;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
}

.generated-card .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f4fa;
}

.generated-card .detail-row .label {
    font-weight: 600;
    color: #2c3e50;
}

/* ALERT */
.alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #28a745;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
}

/* DASHBOARD TABLE */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th {
    background: #0a2a5e;
    color: white;
    padding: 12px 15px;
    text-align: left;
    white-space: nowrap;
}

table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e8edf6;
}

table tr:hover {
    background: #f0f7ff;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.delete-btn:hover {
    background: #c82333;
}

/* STATS CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card.total {
    background: linear-gradient(135deg, #0a2a5e, #1a4a8a);
    color: white;
}

.stat-card.pending {
    background: #fff3cd;
    color: #856404;
}

.stat-card.approved {
    background: #d4edda;
    color: #155724;
}

/* DEPARTMENTS */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dept-card {
    background: white;
    padding: 25px 20px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    text-align: center;
    border: 1px solid #e8edf6;
}

.dept-card i {
    font-size: 2.5rem;
    color: #1a4a8a;
    margin-bottom: 10px;
}

.dept-card h4 {
    color: #0a2a5e;
}

/* FOOTER */
.footer {
    background: #0a1f3b;
    color: #b0c4de;
    padding: 25px 0;
    margin-top: 40px;
    text-align: center;
    border-top: 5px solid #ff9933;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    .logo-section h1 {
        font-size: 1.3rem;
    }
    .nav-bar ul {
        justify-content: center;
    }
    .nav-bar ul li a {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .gov-card {
        min-width: 100px;
        padding: 12px;
    }
    .section-title {
        font-size: 1.3rem;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    table {
        font-size: 0.7rem;
    }
    table th,
    table td {
        padding: 5px 8px;
    }
}

/* PRINT */
@media print {
    .no-print {
        display: none !important;
    }
    .generated-card {
        border: 2px solid #000 !important;
        box-shadow: none !important;
    }
    .header,
    .nav-bar,
    .footer {
        display: none !important;
    }
}