/* WIR Budget System — custom styles */

/* ── Colour palette ─────────────────────────────────────── */
:root {
    --wir-primary: #1a5276;
    --wir-secondary: #2e86c1;
    --wir-accent: #27ae60;
    --wir-light: #eaf2f8;
    --wir-bg: #f4f6f9;
}

/* ── Global ─────────────────────────────────────────────── */
body {
    background: var(--wir-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    background: linear-gradient(135deg, var(--wir-primary) 0%, var(--wir-secondary) 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.navbar-brand {
    font-weight: 700;
    letter-spacing: .5px;
    font-size: 1.15rem;
}
.navbar-brand img {
    transition: transform .2s ease;
}
.navbar-brand:hover img {
    transform: scale(1.08);
}
.nav-link {
    font-weight: 500;
    font-size: .9rem;
    padding: .5rem .75rem !important;
    border-radius: .375rem;
    transition: background .15s ease;
}
.nav-link:hover {
    background: rgba(255,255,255,.12);
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
    border-radius: .625rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.08);
    transition: box-shadow .2s ease;
}
.card[style*="background"] {
    background-color: transparent !important;
}
.card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.card-header {
    font-weight: 600;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

/* ── Status badges ──────────────────────────────────────── */
.badge {
    font-weight: 500;
    letter-spacing: .3px;
}

/* ── Tables ─────────────────────────────────────────────── */
.table th {
    white-space: nowrap;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #555;
}
.table td, .table th {
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background-color: rgba(26, 82, 118, .04);
}

/* ── Progress bars ──────────────────────────────────────── */
.progress {
    border-radius: 1rem;
    background-color: #e9ecef;
}

/* ── Dashboard stat cards ───────────────────────────────── */
.stat-card {
    transition: transform .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
}

/* ── Budget info panel on request form ──────────────────── */
#budgetInfo {
    transition: opacity .2s ease;
}

/* ── Timeline in request detail ─────────────────────────── */
.timeline .badge {
    min-width: 2rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Login page ─────────────────────────────────────────── */
body.login-page {
    background: linear-gradient(135deg, var(--wir-primary), var(--wir-secondary));
    min-height: 100vh;
}
.login-page .card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

/* ── Responsive tweaks ──────────────────────────────────── */
@media (max-width: 768px) {
    .table-responsive {
        font-size: .85rem;
    }
    .navbar-brand span {
        font-size: .95rem;
    }
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
    font-size: .85rem;
}

/* ── Clickable dashboard cards ──────────────────────────── */
.card-hover {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ── Timeline scrollable area ──────────────────────────── */
.timeline-scroll {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
}
.timeline-scroll::-webkit-scrollbar {
    width: 6px;
}
.timeline-scroll::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 3px;
}
.timeline-scroll::-webkit-scrollbar-track {
    background: transparent;
}

/* ── Page headings ──────────────────────────────────────── */
h2 > .bi {
    color: var(--wir-secondary);
    margin-right: .25rem;
}

/* ── Form inputs ────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--wir-secondary);
    box-shadow: 0 0 0 .2rem rgba(46, 134, 193, .2);
}

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
    border-radius: .5rem;
}

/* ── Breadcrumbs ────────────────────────────────────────── */
.breadcrumb {
    font-size: .875rem;
    background: transparent;
    padding: 0;
}

/* ── Print styles ───────────────────────────────────────── */
@media print {
    .navbar, footer, .btn, .breadcrumb { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}
