/* wwwroot/css/site.css */

:root {
    --primary: #005A9E;
    --primary-light: #1477c4;
    --primary-dark: #003d6b;
    --accent: #F4B400;
    --bg: #F5F7FA;
    --text: #1F2937;
    --muted: #6B7280;
    --danger: #CC3333;
}

/* Base ------------------------------------------------------------------ */

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}



body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, sans-serif;
}



/* Smooth UI transitions */
* {
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

main {
    flex: 1 0 auto;
    padding-top:0px;   
}

/* Container & layout ---------------------------------------------------- */

.container {
    max-width: 1200px !important;
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
}

section {
    margin-bottom: 2.5rem;
}

/* Links ----------------------------------------------------------------- */

a {
    color: var(--primary);
    text-decoration: none;
}

    a:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

/* Buttons --------------------------------------------------------------- */

.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
}

    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus,
    .form-control:focus,
    .form-check-input:focus {
        box-shadow: 0 0 0 0.12rem #ffffff, 0 0 0 0.24rem rgba(0, 90, 158, 0.7);
        outline: none;
    }

.btn-primary {
    color: #ffffff;
    background-color: var(--primary);
    border-color: var(--primary-dark);
}

    .btn-primary:hover {
        color: #ffffff;
        background-color: var(--primary-light);
        border-color: var(--primary);
    }

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

    .btn-outline-primary:hover {
        color: #ffffff;
        background-color: var(--primary);
        border-color: var(--primary);
    }

.btn-danger {
    background-color: var(--danger);
    border-color: #b32a2a;
}

    .btn-danger:hover {
        background-color: #e24141;
        border-color: #cc3636;
    }

/* Forms ----------------------------------------------------------------- */

.form-control,
.form-select {
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
    border-color: #d1d5db;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 0.15rem rgba(0, 90, 158, 0.25);
    }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Cards & panels -------------------------------------------------------- */

.card {
    border: none;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.card-header {
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: #ffffff;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem 1.5rem 1.25rem 1.5rem;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

/* Tables ---------------------------------------------------------------- */

.table {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

    .table thead {
        background: #e5eff9;
    }

        .table thead th {
            border-bottom: none;
            color: var(--primary-dark);
            font-weight: 600;
            font-size: 0.9rem;
        }

    .table tbody tr:hover {
        background-color: #f3f6fb;
    }

    .table td,
    .table th {
        padding: 0.6rem 0.75rem;
        vertical-align: middle;
    }

/* Typography ------------------------------------------------------------ */

h1, h2, h3, h4, h5 {
    color: var(--primary-dark);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.lead {
    color: var(--muted);
}

/* Alerts ---------------------------------------------------------------- */

.alert-primary {
    background-color: #e5eff9;
    border-color: var(--primary-light);
    color: var(--primary-dark);
}

/* Badges ---------------------------------------------------------------- */

.badge-primary,
.bg-primary {
    background-color: var(--primary) !important;
}

/* Utility ----------------------------------------------------------------*/

.border-top {
    border-top: 1px solid #e5e7eb !important;
}

.border-bottom {
    border-bottom: 1px solid #e5e7eb !important;
}

.box-shadow {
    box-shadow: 0 0.25rem 0.75rem rgba(15, 23, 42, 0.08);
}

/* Footer ---------------------------------------------------------------- */

.footer {
    background: #ffffff;
    color: var(--muted);
    border-top: 1px solid #e5e7eb;
    text-align: center;
    padding: 1rem 0;
    line-height: 1.4;
}

    .footer a {
        color: var(--primary);
    }

        .footer a:hover {
            color: var(--primary-dark);
        }

/* Misc ------------------------------------------------------------------ */

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #ffffff;
    background-color: var(--primary);
    border-color: var(--primary-dark);
}


.card-header .text-muted {
    color:#bbbbbb !important; 
}


/* --- TOP BAR --- */
.topbar {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
}

.topbar-logo {
    color: var(--primary-dark);
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

/* --- SIDEBAR --- */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 50px; /* collapsed width */
    height: calc(100vh - 60px);
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.25s ease;
    z-index: 1040;
}

    .sidebar:hover {
        width: 240px; /* expanded width */
    }

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-nav li a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 18px;
        color: var(--text);
        text-decoration: none;
        font-size: 0.95rem;
        white-space: nowrap;
        transition: background 0.15s ease, color 0.15s ease;
    }

        .sidebar-nav li a:hover {
            background: #eef5ff;
            color: var(--primary);
        }

    .sidebar-nav i {
        font-size: 1.2rem;
    }

/* --- MAIN CONTENT AREA --- */
.main-content {
    margin-left: 60px; /* collapsed sidebar width */
    padding-top: 70px; /* room for sticky topbar */
    transition: margin-left 0.25s ease;
}

.sidebar:hover ~ .main-content {
    margin-left: 240px; /* expanded width */
}

/* Footer stays below main content */
footer.footer {
    transition: margin-left 0.25s ease;
}

.sidebar:hover ~ footer.footer {
    margin-left: 240px;
}

.topbar .navbar-nav {
    flex-direction: row;
    gap: 1rem;
    margin-bottom: 0;
}

.navbar-brand span {
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

/* Mobile sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 240px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    padding: 1.25rem;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    transition: left 0.25s ease;
}

    .mobile-sidebar.open {
        left: 0;
    }


@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 768px) {

    /* Keep main content clean for ALL pages */
    .main-content {
        margin-left: 0 !important;
        padding: 80px 1rem 2rem 1rem;
    }

    /* Only center the dashboard */
    .kpi-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

        .kpi-wrapper > * {
            width: 100%;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }
}


