/*
|--------------------------------------------------------------------------
| BFAS - Building Fees Assessment System
| Main Stylesheet
|--------------------------------------------------------------------------
| File: assets/css/style.css
*/

:root {
    --bfas-primary: #0f4c81;
    --bfas-primary-dark: #0a355c;
    --bfas-secondary: #198754;
    --bfas-accent: #ffc107;
    --bfas-danger: #dc3545;
    --bfas-info: #0dcaf0;
    --bfas-bg: #f4f6f9;
    --bfas-card: #ffffff;
    --bfas-text: #212529;
    --bfas-muted: #6c757d;
    --bfas-border: #d9dee5;
    --bfas-sidebar: #102a43;
    --bfas-sidebar-hover: #1d3f5f;
    --bfas-blue-light: #e8f2ff;
    --bfas-red-panel: #930000;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--bfas-bg);
    color: var(--bfas-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

/* OLD SYSTEM INSPIRED TOP BAR */
.bfas-top-strip {
    background: #d4d4d4;
    border-bottom: 1px solid #9a9a9a;
    padding: 8px 14px;
}

.bfas-brand-box {
    background: #061caa;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 8px 14px;
    min-width: 210px;
    text-align: center;
    box-shadow: inset 0 0 0 1px #003c88;
}

.bfas-brand-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 2px;
}

.bfas-brand-subtitle {
    font-size: 12px;
    margin-top: 2px;
}

.bfas-brand-version {
    font-size: 11px;
    margin-top: 2px;
}

.bfas-office-box {
    background: #c9c9c9;
    border: 2px solid #efefef;
    padding: 8px 20px;
    text-align: center;
    min-height: 70px;
}

.bfas-office-country {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    color: #111111;
}

.bfas-office-name {
    color: #0033cc;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.bfas-office-location {
    color: #777777;
    font-size: 14px;
}

/* LAYOUT - FIXED NAVBAR + SIDEBAR NO GAP */
.bfas-wrapper {
    display: flex;
    min-height: calc(100vh - 58px);
}

.bfas-navbar {
    min-height: 58px;
    height: 58px;
    background: #ffffff;
    border-bottom: 1px solid var(--bfas-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
}

.bfas-sidebar {
    width: 255px;
    background: var(--bfas-sidebar);
    color: #ffffff;
    position: fixed;
    top: 58px; /* directly below navbar */
    bottom: 0;
    left: 0;
    overflow-y: auto;
    transition: all 0.25s ease;
    z-index: 1000;
}

.bfas-sidebar.collapsed {
    margin-left: -255px;
}

.bfas-main {
    margin-left: 255px;
    width: calc(100% - 255px);
    min-height: calc(100vh - 58px);
    margin-top: 58px;
    transition: all 0.25s ease;
}

.bfas-main.expanded {
    margin-left: 0;
    width: 100%;
}

.bfas-content {
    padding: 14px 20px 20px 20px;
}

.sidebar-header {
    padding: 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 3px 0 0;
}

.sidebar-menu {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.88);
    padding: 11px 18px;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.15s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--bfas-sidebar-hover);
    color: #ffffff;
    border-left-color: var(--bfas-accent);
}

.sidebar-section {
    padding: 14px 18px 6px;
    color: rgba(255, 255, 255, 0.48);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

/* NAVBAR */
.bfas-navbar {
    min-height: 58px;
    background: #ffffff;
    border-bottom: 1px solid var(--bfas-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.bfas-navbar-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--bfas-primary);
}

.bfas-navbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CARDS */
.bfas-card {
    background: var(--bfas-card);
    border: 1px solid var(--bfas-border);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(16, 42, 67, 0.05);
    margin-bottom: 18px;
	margin-top: 0;
}

.bfas-card-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--bfas-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, var(--bfas-blue-light), #ffffff);
    border-radius: 12px 12px 0 0;
}

.bfas-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--bfas-primary);
    margin: 0;
}

.bfas-card-body {
    padding: 16px;
}

.bfas-panel-title {
    background: #3498eb;
    color: #ffffff;
    padding: 6px 12px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    border-radius: 6px;
}

/* DASHBOARD */
.stat-card {
    border-radius: 14px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--bfas-border);
    box-shadow: 0 4px 18px rgba(16, 42, 67, 0.06);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -35px;
    bottom: -35px;
    width: 100px;
    height: 100px;
    background: rgba(15, 76, 129, 0.08);
    border-radius: 50%;
}

.stat-label {
    color: var(--bfas-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--bfas-primary);
}

/* FORMS */
.form-label {
    font-weight: 600;
    color: #334e68;
    margin-bottom: 4px;
}

.form-control,
.form-select {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    min-height: 38px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bfas-primary);
    box-shadow: 0 0 0 0.15rem rgba(15, 76, 129, 0.16);
}

.form-control-sm,
.form-select-sm {
    min-height: 31px;
    border-radius: 6px;
}

.required::after {
    content: " *";
    color: var(--bfas-danger);
}

.help-text {
    font-size: 12px;
    color: var(--bfas-muted);
}

/* ASSESSMENT PAGE */
.assessment-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.assessment-tabs {
    background: #ffffff;
    border: 1px solid var(--bfas-border);
    border-radius: 12px;
    padding: 12px;
}

.assessment-tabs .nav-tabs {
    border-bottom: 1px solid var(--bfas-border);
}

.assessment-tabs .nav-link {
    color: #334e68;
    font-weight: 600;
    border-radius: 8px 8px 0 0;
}

.assessment-tabs .nav-link.active {
    color: var(--bfas-primary);
    background: var(--bfas-blue-light);
    border-color: var(--bfas-border) var(--bfas-border) #ffffff;
}

.assessment-tab-body {
    padding: 16px 4px 4px;
}

.fee-section-title {
    background: #f1f7ff;
    color: var(--bfas-primary);
    border-left: 4px solid var(--bfas-primary);
    padding: 9px 12px;
    font-weight: 700;
    margin: 18px 0 12px;
    border-radius: 6px;
}

.fee-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.fee-row .unit-label {
    color: #d00000;
    font-size: 12px;
    font-weight: 600;
}

.summary-card {
    position: sticky;
    top: 76px;
}

.summary-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed #d7dee8;
    font-size: 13px;
}

.summary-list li:last-child {
    border-bottom: 0;
}

.summary-label {
    color: #52606d;
}

.summary-amount {
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}

.summary-total {
    background: #fff3cd;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    color: #8a5a00;
}

.share-box {
    background: #eef9f0;
    padding: 10px 12px;
    border-radius: 8px;
    margin-top: 10px;
}

.share-box .share-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}

/* TABLES */
.table {
    vertical-align: middle;
}

.table thead th {
    background: var(--bfas-primary);
    color: #ffffff;
    border-color: var(--bfas-primary-dark);
    font-size: 13px;
}

.table-sm td,
.table-sm th {
    padding: 0.45rem;
}

.table-hover tbody tr:hover {
    background-color: #f1f7ff;
}

/* BUTTONS */
.btn {
    border-radius: 8px;
    font-weight: 600;
}

.btn-bfas {
    background: var(--bfas-primary);
    color: #ffffff;
    border-color: var(--bfas-primary);
}

.btn-bfas:hover {
    background: var(--bfas-primary-dark);
    color: #ffffff;
    border-color: var(--bfas-primary-dark);
}

.btn-soft-primary {
    background: var(--bfas-blue-light);
    color: var(--bfas-primary);
    border: 1px solid #cce4ff;
}

.btn-soft-primary:hover {
    background: #d9edff;
    color: var(--bfas-primary-dark);
}

/* OLD DESKTOP FORM LOOK - OPTIONAL */
.legacy-workspace {
    background: var(--bfas-red-panel);
    min-height: calc(100vh - 145px);
    padding: 12px;
}

.legacy-window {
    background: #e9e9e9;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #666666;
}

.legacy-window-title {
    background: #3498eb;
    color: #ffffff;
    padding: 4px 12px;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.legacy-window-body {
    padding: 10px;
}

/* BADGES */
.badge {
    font-weight: 600;
    padding: 0.42em 0.65em;
}

/* PRINT */
.print-header {
    text-align: center;
    margin-bottom: 18px;
}

.print-title {
    font-size: 18px;
    font-weight: 800;
}

.print-subtitle {
    font-size: 13px;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
}

.print-table th,
.print-table td {
    border: 1px solid #000000;
    padding: 6px 8px;
    font-size: 12px;
}

@media print {
    body {
        background: #ffffff;
        font-size: 12px;
    }

    .bfas-sidebar,
    .bfas-navbar,
    .no-print,
    .btn {
        display: none !important;
    }

    .bfas-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .bfas-content {
        padding: 0;
    }

    .bfas-card {
        box-shadow: none;
        border: 0;
    }
}

/* RESPONSIVE */
@media (max-width: 1199px) {
    .assessment-shell {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }
}

@media (max-width: 991px) {
    .bfas-sidebar {
        margin-left: -255px;
        top: 58px;
    }

    .bfas-sidebar.show {
        margin-left: 0;
    }

    .bfas-main {
        margin-left: 0;
        width: 100%;
        margin-top: 58px;
    }

    .bfas-navbar {
        height: 58px;
        min-height: 58px;
        padding: 0 12px;
    }

    .bfas-navbar-title {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 13px;
    }

    .bfas-content {
        padding: 12px;
    }

    .bfas-navbar {
        padding: 0 12px;
    }

    .bfas-navbar-title {
        font-size: 15px;
    }

    .fee-row {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 23px;
    }

    .table-responsive {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .bfas-brand-title {
        font-size: 20px;
    }

    .bfas-brand-subtitle,
    .bfas-brand-version {
        font-size: 10px;
    }

    .bfas-card-body {
        padding: 12px;
    }
}
/* FOOTER - ALIGN WITH MAIN CONTENT, NOT BEHIND SIDEBAR */
.bfas-footer {
    margin-left: 255px;
    width: calc(100% - 255px);
    background: #ffffff;
    border-top: 1px solid var(--bfas-border);
    padding: 10px 18px;
    font-size: 13px;
    color: var(--bfas-muted);
    transition: all 0.25s ease;
}

.bfas-main.expanded + .bfas-footer,
.bfas-footer.expanded {
    margin-left: 0;
    width: 100%;
}

@media (max-width: 991px) {
    .bfas-footer {
        margin-left: 0;
        width: 100%;
    }
}