:root {
    --blue: #3976BB;
    --blue-dark: #37598D;
    --dark: #172033;
    --soft: #f4f7fb;
    --card: #ffffff;
    --line: #dfe7f2;
    --muted: #64748b;
    --good: #147a3d;
    --bad: #b3261e;
    --warning: #b7791f;
    --shadow: 0 12px 34px rgba(23, 32, 51, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(57, 118, 187, 0.12), transparent 34%),
        var(--soft);
    color: var(--dark);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background:
        linear-gradient(
            135deg,
            rgba(17, 37, 74, 0.88),
            rgba(57, 118, 187, 0.82)
        );

    color: #fff;

    padding: 16px 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 10px 30px rgba(23, 32, 51, 0.22);
}

.brand {
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.nav a,
.nav button {
    color: #fff;
    text-decoration: none;

    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);

    border-radius: 999px;

    padding: 0.55rem 1rem;

    cursor: pointer;

    font-weight: 600;
    font-size: 0.95rem;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;

    backdrop-filter: blur(8px);
}

.nav a:hover,
.nav button:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);

    transform: translateY(-1px);
}
.container {
    max-width: 1220px;
    margin: 28px auto;
    padding: 0 18px;
}

h1,
h2,
h3 {
    letter-spacing: -0.03em;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(28px, 4vw, 40px);
}

h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

h3 {
    margin: 20px 0 10px;
    font-size: 17px;
}

.card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric {
    padding: 18px;
    border-radius: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.metric .label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric .value {
    font-size: 30px;
    font-weight: 900;
    margin-top: 8px;
    letter-spacing: -0.04em;
}

.good {
    color: var(--good);
}

.bad {
    color: var(--bad);
}

.warning {
    color: var(--warning);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    text-align: left;
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.05em;
    font-weight: 900;
    background: #f8fbff;
}

tr:hover td {
    background: #fbfdff;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd8e3;
    border-radius: 13px;
    background: #fff;
    color: var(--dark);
    font: inherit;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(57, 118, 187, 0.14);
}

label {
    display: block;
    font-weight: 800;
    margin: 12px 0 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 13px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
    min-height: 42px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(57, 118, 187, 0.22);
}

.btn.secondary {
    background: #eaf1fb;
    color: #1c3f70;
}

.btn.secondary:hover {
    background: #dce9f9;
}

.btn.danger {
    background: var(--bad);
}

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

.flash {
    padding: 13px 15px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 800;
}

.flash.success {
    background: #e8f7ee;
    color: #0b6b34;
}

.flash.error {
    background: #fdeceb;
    color: #8a1c15;
}

.login {
    max-width: 440px;
    margin: 8vh auto;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf4ff;
    color: #23466f;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 950px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .grid,
    .two {
        grid-template-columns: 1fr;
    }

    .container {
        margin: 18px auto;
        padding: 0 12px;
    }

    .card {
        padding: 16px;
        border-radius: 18px;
    }

    table {
        font-size: 14px;
        min-width: 760px;
    }

    .metric .value {
        font-size: 26px;
    }

    .actions {
        align-items: stretch;
    }

    .actions .btn,
    .actions button,
    .actions input {
        width: 100%;
    }
}

/* =========================
   CALENDAR
========================= */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.calendar-weekday {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.06em;
    padding: 8px 4px;
}

.calendar-cell {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    min-height: 180px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-cell.empty {
    background: transparent;
    border: none;
}

.calendar-cell.today {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(57, 118, 187, 0.12);
}

.calendar-day {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 4px;
}

.calendar-bill {
    border-radius: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    font-size: 12px;
    line-height: 1.3;
}

.calendar-bill-name {
    font-weight: 900;
    margin-bottom: 4px;
}

.calendar-bill-amount {
    font-weight: 700;
}

.calendar-property {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.calendar-bill.paid {
    background: #e8f7ee;
    border-color: #b8e6c8;
}

.calendar-bill.pending {
    background: #edf4ff;
    border-color: #cfe0f7;
}

.calendar-bill.overdue {
    background: #fdeceb;
    border-color: #f4b9b3;
}

@media (max-width: 1200px) {
    .calendar-grid {
        min-width: 1100px;
    }
}    

.notification {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    background: #fff;
}

.notification.unread {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(57, 118, 187, 0.08);
}

.notification.read {
    opacity: 0.75;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.notification-title {
    font-weight: 900;
    font-size: 17px;
}

.notification-date {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.notification-message {
    margin-top: 12px;
    line-height: 1.5;
}
.nav-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:20px;
    height:20px;
    padding:0 6px;
    margin-left:6px;
    border-radius:999px;
    background:#ff4d4f;
    color:#fff;
    font-size:11px;
    font-weight:800;
    line-height:1;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    max-width: 220px;
    width: 100%;
    height: auto;
}


.login-logo-card {
    width: 180px;
    margin: 0 auto 1.5rem;

    background: #ffffff;
    border-radius: 24px;

    padding: 1.5rem;

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo-card img {
    width: 100%;
    height: auto;
    display: block;
}

.brand-logo {
    max-width: 140px;
    height: auto;
    display: block;
}