/* ----------------------------
   Flat Management System - Blue Theme
   - Accessible contrast
   - Responsive layout
   - Modern components
   - CSS variables for easy theming
----------------------------- */

.nav {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-item {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ccc;
}

.nav-item:hover .dropdown-menu {
    display: block;
}


:root {
    --primary-900: #203553;
    --primary-800: #27436b;
    --primary-700: #304f7a;
    --primary-600: #dce7f8;
    --primary-500: #cbdcf5;
    --primary-100: #eff4fc;
    --accent-500: #cbdcf5;
    --warning-500: #f0ad4e;
    --danger-500: #e55353;
    --bg-body: #f7f9fc;
    --bg-surface: #ffffff;
    --text-900: #0b1220;
    --text-700: #344563;
    --text-500: #6b7a90;
    --border-200: #e4e9f2;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: light;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
    color: var(--text-900);
    background: #f8faff;
    min-height: 100vh;
    line-height: 1.6;
}

/* Layout */
.container {
    width: 100%;
    height:70%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

header.site-header {
    background: #eef3fc;
    color: #263b59;
    padding: 22px 14px;
    box-shadow: var(--shadow-md);
}

header .brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand__logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #dce7f8;
    display: inline-grid;
    place-items: center;
    color: var(--primary-700);
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 6px 20px rgba(0,0,0,0.12);
}

.brand__title {
    margin: 0;
    font-size: clamp(22px, 2.5vw, 28px);
    letter-spacing: 0.2px;
}

.brand__subtitle {
    margin: 4px 0 0;
    color: #5d6d83;
    font-size: 14px;
}

/* Navigation */
nav.site-nav {
    background: #ffffffdd;
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--border-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 24px;
}

.nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

    .nav-links a {
        text-decoration: none;
        color: var(--text-700);
        padding: 10px 14px;
        border-radius: 10px;
        transition: all 160ms ease;
        font-weight: 600;
    }

        .nav-links a:hover {
            color: var(--primary-700);
            background: var(--primary-100);
        }

        .nav-links a.active {
            color: var(--primary-800);
            background: var(--primary-600);
            box-shadow: var(--shadow-sm);
        }

.spacer {
    flex: 1;
}

/* Buttons */
.button,
button,
input[type="submit"] {
    appearance: none;
    border: 0;
    background: var(--primary-600);
    color: var(--primary-800);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 0 rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 80ms ease, box-shadow 160ms ease, background 160ms ease;
}

    .button:hover,
    button:hover,
    input[type="submit"]:hover {
        background: var(--primary-500);
        box-shadow: 0 6px 16px rgba(48, 79, 122, 0.16);
    }

    .button:active,
    button:active,
    input[type="submit"]:active {
        transform: translateY(1px);
    }

.button--ghost {
    background: transparent;
    color: var(--primary-700);
    border: 1px solid var(--primary-600);
}

    .button--ghost:hover {
        background: var(--primary-100);
    }

/* Cards & Surfaces */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-200);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

    .card + .card {
        margin-top: 16px;
    }

.section {
    margin: 24px 0;
}

.section__title {
    margin: 0 0 12px;
    font-size: clamp(18px, 2vw, 22px);
    color: var(--primary-800);
}

/* Grid helpers */
.grid {
    display: grid;
    gap: 16px;
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .grid--2, .grid--3 {
        grid-template-columns: 1fr;
    }
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border: 1px solid var(--border-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .table th, .table td {
        padding: 12px 14px;
        text-align: left;
        border-bottom: 1px solid var(--border-200);
        color: var(--text-700);
    }

    .table th {
        background: #edf2fb;
        color: var(--primary-800);
        font-weight: 800;
    }

    .table tbody tr:hover {
        background: #3095ea;
    }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge--paid {
    background: #e6f7f1;
    color: #0f7a5a;
}

.badge--due {
    background: #fff4e5;
    color: #a56500;
}

.badge--over {
    background: #ffe6e6;
    color: #9b1c1c;
}

/* Forms */
.form {
    display: grid;
    gap: 14px;
}

.label {
    font-size: 13px;
    color: var(--text-500);
    margin-bottom: 6px;
    display: inline-block;
}

.styled-dropdown {
    width: 250px;
    padding: 10px;
    border: 2px solid #4682B4;
    border-radius: 5px;
    background-color: #f0f8ff; /* light blue background */
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .styled-dropdown:focus {
        border-color: #5A9BD4;
        box-shadow: 0 0 5px rgba(70, 130, 180, 0.5);
        outline: none;
    }

    .styled-dropdown option {
        padding: 8px;
    }


.input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-200);
    border-radius: 10px;
    background: #fff;
    color: var(--text-900);
    outline: none;
    transition: border 120ms ease, box-shadow 120ms ease;
}

    .input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--primary-600);
        box-shadow: 0 0 0 3px rgba(21, 96, 208, 0.15);
    }

.help {
    font-size: 12px;
    color: var(--text-500);
}

/* Alerts */
.alert {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-200);
    background: #f7fbff;
    color: var(--primary-800);
}

.alert--success {
    background: #f2fbf7;
    border-color: #d2f0e3;
    color: #0d6f57;
}

.alert--warning {
    background: #fff8ed;
    border-color: #ffe7c2;
    color: #8a5a12;
}

.alert--danger {
    background: #fff1f1;
    border-color: #ffd7d7;
    color: #842029;
}

/* Footer */
footer.site-footer {
    border-top: 1px solid var(--border-200);
    margin-top: 36px;
    background: #ffffffb5;
    backdrop-filter: blur(6px);
}

.footer-inner {
    padding: 18px 24px;
    color: var(--text-500);
    font-size: 14px;
    text-align: center;
}

/* Utility spacing */
.mt-0 {
    margin-top: 0;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-32 {
    margin-top: 32px;
}
