/* ========================================================
   Financial Assistance Portal — Modern, Clean UI Design System
   ======================================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --success: #10b981;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    
    --dark: #0f172a;
    --muted: #64748b;
    --border-color: #e2e8f0;
    --bg-page: #f8fafc;
    --surface: #ffffff;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 20px -3px rgba(37, 99, 235, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

body {
    background-color: var(--bg-page);
    color: #1e293b;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main.container {
    flex: 1;
    animation: smoothFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes smoothFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------- Navbar & Gov Banner ---------------- */
.gov-topbar {
    background: #090d16;
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-custom {
    background: #0f172a !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.15);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff !important;
}

.brand-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eab308;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: #ffffff;
}

.mswdo-seal-hero {
    position: relative;
    border-radius: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(234, 179, 8, 0.5);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.mswdo-seal-hero:hover {
    transform: translateY(-4px) scale(1.02);
}

.mswdo-seal-hero img {
    border-radius: 14px;
    width: 100%;
    max-width: 280px;
    display: block;
}

/* ---------------- Cards & Surfaces ---------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: #0f172a;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* ---------------- Buttons ---------------- */
.btn {
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.1rem;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid #1d4ed8;
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1e40af;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
    border-color: #93c5fd;
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
}

.btn-secondary {
    background: #64748b;
    border-color: #475569;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-light {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #334155;
}

.btn-light:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* ---------------- Form Controls ---------------- */
.form-label {
    font-weight: 600;
    font-size: 0.825rem;
    color: #334155;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.form-control, .form-select {
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    color: #0f172a;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* ---------------- Tables ---------------- */
.table {
    margin-bottom: 0;
    color: #1e293b;
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
    transition: background-color 0.15s ease;
}

/* ---------------- Badges ---------------- */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.7em;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.bg-primary {
    background-color: var(--primary-light) !important;
    color: #1d4ed8 !important;
    border: 1px solid var(--primary-border);
}

.badge.bg-success {
    background-color: var(--success-light) !important;
    color: #047857 !important;
    border: 1px solid var(--success-border);
}

.badge.bg-warning {
    background-color: var(--warning-light) !important;
    color: #b45309 !important;
    border: 1px solid var(--warning-border);
}

.badge.bg-danger {
    background-color: var(--danger-light) !important;
    color: #b91c1c !important;
    border: 1px solid var(--danger-border);
}

.badge.bg-info {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0;
}

.badge.bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
}

/* Notification & Attention Badges */
.notif-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
}

.notif-pulse {
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* ---------------- Alerts ---------------- */
.alert {
    border-radius: var(--radius-md);
    border-width: 1px;
    padding: 0.85rem 1.15rem;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-border);
    color: #065f46;
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger-border);
    color: #991b1b;
}

.alert-warning {
    background-color: var(--warning-light);
    border-color: var(--warning-border);
    color: #92400e;
}

.alert-info {
    background-color: var(--primary-light);
    border-color: var(--primary-border);
    color: #1e40af;
}

/* ---------------- Hero & Landing Graphics ---------------- */
.hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3a8a 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
    padding: 3.5rem 2.5rem;
}

.hero-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0) 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.feature-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 1rem;
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.1);
}

/* ---------------- Dashboard Stat Cards ---------------- */
.stat-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.stat-widget .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.stat-widget .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------------- Form Sections ---------------- */
.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ---------------- Dropdown Menu ---------------- */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    padding: 0.5rem 0.85rem;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

/* ---------------- Footer ---------------- */
footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    color: #64748b;
    font-size: 0.85rem;
}

/* ---------------- Compact Calendar Interface ---------------- */
.cal-grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 4px;
}

.cal-weekday {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    padding: 3px 0;
    background: #f8fafc;
    border-radius: 4px;
}

.cal-grid-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.cal-day {
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 2px;
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.cal-day:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.cal-day.out-month {
    background: #fafafa;
    color: #cbd5e1;
    border-color: #f8fafc;
    cursor: default;
}

.cal-day.is-today {
    border: 2px solid var(--primary);
    background: #eff6ff;
}

.cal-day.selected-day {
    border: 2px solid #2563eb !important;
    background: #dbeafe !important;
}

.cal-day-number {
    font-weight: 700;
    font-size: 0.75rem;
    color: #334155;
    line-height: 1;
}

.cal-day.is-today .cal-day-number {
    color: var(--primary);
}

.cal-day.out-month .cal-day-number {
    color: #cbd5e1;
}

.cal-dot-badge {
    font-size: 0.58rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 1px 4px;
    line-height: 1;
    margin-top: 1px;
    background-color: #2563eb;
    color: #ffffff;
}

/* ---------------- Table Fit (No Horizontal Scrollbar) ---------------- */
.table-no-scroll {
    width: 100%;
    overflow-x: auto;
}

.table-compact-admin {
    width: 100%;
    table-layout: auto;
    font-size: 0.825rem;
}

.table-compact-admin th {
    padding: 0.65rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.table-compact-admin td {
    padding: 0.65rem 0.6rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.clickable-row:hover {
    background-color: #f1f5f9 !important;
}
