/* ============================================
   MODERN MINIMAL GOVERNMENT PORTAL STYLESHEET
   ============================================ */

/* CSS Variables for Theming */
:root {
    --primary-color: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d47a1;
    --secondary-color: #c5a47e;
    --secondary-light: #d4b99c;
    --secondary-dark: #b38d6a;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.20);

    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-error: linear-gradient(135deg, #dc3545 0%, #c82333 100%);

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-light);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    background-color: var(--bg-white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(57, 73, 171, 0.1);
    background-color: var(--bg-white);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: 8px;
    transition: var(--transition-smooth);
    padding: 0.8rem 1.5rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: darken(var(--success-color), 10%);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ============================================
   CARDS & CONTAINERS
   ============================================ */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    background: var(--bg-white);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 1.25rem;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #1e5631;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid var(--error-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

/* ============================================
   MODALS & OVERLAYS
   ============================================ */

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* ============================================
   TABLES
   ============================================ */

.table {
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-color);
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: var(--transition-smooth);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-muted { color: var(--text-light) !important; }
.text-success { color: var(--success-color) !important; }
.text-error { color: var(--error-color) !important; }

.bg-primary { background: var(--gradient-primary) !important; color: white; }
.bg-light { background: var(--bg-light) !important; }
.bg-white { background: var(--bg-white) !important; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded-12 { border-radius: 12px; }

/* ============================================
   WELCOME PAGE
   ============================================ */

.welcome-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.welcome-card-copy {
    min-height: 72px;
}

.welcome-card-body .btn {
    margin-top: auto;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    .card { margin-bottom: 1rem; }
    .btn { width: 100%; }
    .welcome-card-copy { min-height: auto; }
}

@media (max-width: 576px) {
    body { font-size: 14px; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ============================================
   Shared component styles
   ============================================ */

.title-doc-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.title-doc-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #667085;
    font-weight: 600;
}

.title-doc-chip {
    background: #fff4d6;
    border: 1px solid #ffd28a;
    color: #7a2e0e;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1.1rem;
}

.summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #667085;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.summary-value {
    font-weight: 600;
    color: #101828;
}

.grid-span {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .grid-span {
        grid-column: span 1;
    }
}
