/* ================================
   ADD PROPERTY MODAL - FIX
================================ */

.property-form-overlay {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.65) !important;
    z-index: 99999 !important;

    align-items: center !important;
    justify-content: center !important;

    padding: 20px !important;
    box-sizing: border-box !important;
}

.property-form {
    width: 100% !important;
    max-width: 520px !important;

    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 28px !important;

    box-sizing: border-box !important;

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25) !important;

    position: relative !important;
    z-index: 100000 !important;
}

.property-form .form-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    margin-bottom: 24px !important;
}

.property-form .form-header h2 {
    margin: 0 !important;
    font-size: 22px !important;
    color: #172033 !important;
}

.property-form .form-header button {
    width: 34px !important;
    height: 34px !important;

    border: none !important;
    border-radius: 50% !important;

    background: #f1f5f9 !important;
    color: #475569 !important;

    font-size: 22px !important;
    cursor: pointer !important;
}

.property-form label {
    display: block !important;
    margin: 14px 0 6px !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    color: #334155 !important;
}

.property-form input {
    width: 100% !important;
    height: 44px !important;

    padding: 0 12px !important;

    box-sizing: border-box !important;

    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;

    background: #ffffff !important;
    color: #1e293b !important;

    font-size: 14px !important;
    outline: none !important;
}

.property-form input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.property-form .form-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;

    margin-top: 24px !important;
}

.property-form .form-buttons button {
    min-width: 110px !important;
    height: 42px !important;

    border: none !important;
    border-radius: 8px !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    cursor: pointer !important;
}

.property-form .cancel-btn {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

.property-form .save-btn {
    background: #2563eb !important;
    color: #ffffff !important;
}

.property-form .save-btn:hover {
    background: #1d4ed8 !important;
}

.property-form .cancel-btn:hover {
    background: #cbd5e1 !important;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #111827;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 25px 20px;
    border-bottom: 1px solid #273244;
}

.logo-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 15px;
}

.logo h2 {
    font-size: 16px;
    margin-bottom: 4px;
}

.logo span {
    font-size: 11px;
    color: #9ca3af;
}

.navigation {
    padding: 25px 14px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 9px;
    font-size: 14px;
    transition: 0.2s;
}

.nav-item:hover {
    background: #1f2937;
    color: white;
}

.nav-item.active {
    background: #2563eb;
    color: white;
}

.nav-item span {
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #273244;
}

.sidebar-footer p {
    font-size: 12px;
    color: #d1d5db;
}

.sidebar-footer span {
    font-size: 10px;
    color: #6b7280;
}


/* =========================
   MAIN CONTENT
========================= */

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-width: 0;
    padding: 30px;
    overflow-x: hidden;
}

/* TOP BAR */

.topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.topbar h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.topbar p {
    color: #6b7280;
    font-size: 14px;
}

.admin-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.admin-profile strong {
    display: block;
    font-size: 13px;
}

.admin-profile span {
    display: block;
    color: #6b7280;
    font-size: 11px;
    margin-top: 3px;
}

/* SUMMARY CARDS */

.summary-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.summary-card {
    min-width: 0;
    background: white;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.card-icon {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.card-icon.blue {
    background: #dbeafe;
}

.card-icon.green {
    background: #dcfce7;
}

.card-icon.purple {
    background: #ede9fe;
}

.card-icon.orange {
    background: #ffedd5;
}

.summary-card span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 5px;
}

.summary-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 4px;
}

.summary-card small {
    color: #9ca3af;
    font-size: 10px;
}

/* DASHBOARD GRID */

.dashboard-grid {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.panel {
    min-width: 0;
    background: white;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-header h2 {
    font-size: 17px;
    margin-bottom: 5px;
}

.panel-header p {
    color: #9ca3af;
    font-size: 11px;
}

.view-button {
    border: none;
    background: #eff6ff;
    color: #2563eb;
    padding: 8px 13px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 11px;
}

/* TABLE */

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

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

th {
    text-align: left;
    padding: 12px 10px;
    font-size: 11px;
    color: #6b7280;
    background: #f8fafc;
}

td {
    padding: 14px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
}

.status {
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
}

.status.paid {
    background: #dcfce7;
    color: #15803d;
}

.status.pending {
    background: #fef3c7;
    color: #b45309;
}

/* DUE DATES */

.due-list {
    display: flex;
    flex-direction: column;
}

.due-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.due-item:last-child {
    border-bottom: none;
}

.date-box {
    width: 42px;
    min-width: 42px;
    height: 45px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    text-align: center;
    padding-top: 5px;
}

.date-box strong {
    display: block;
    font-size: 16px;
}

.date-box span {
    font-size: 8px;
    font-weight: bold;
}

.due-info {
    flex: 1;
    min-width: 0;
}

.due-info strong {
    display: block;
    font-size: 12px;
}

.due-info span {
    display: block;
    color: #9ca3af;
    font-size: 10px;
    margin-top: 3px;
}

.due-item > strong {
    font-size: 12px;
}

/* QUICK ACTIONS */

.quick-actions {
    width: 100%;
    background: white;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.quick-actions h2 {
    font-size: 17px;
    margin-bottom: 18px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.action-grid button {
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 10px;
    padding: 18px;
    cursor: pointer;
    font-size: 12px;
    color: #374151;
    transition: 0.2s;
}

.action-grid button:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.action-grid button span {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
}

/* RESPONSIVE */

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .sidebar {
        width: 75px;
    }

    .logo {
        justify-content: center;
        padding: 18px 8px;
    }

    .logo > div:last-child {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 13px 5px;
        font-size: 0;
    }

    .nav-item span {
        font-size: 18px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 75px;
        width: calc(100% - 75px);
        padding: 18px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    .main-content {
        padding: 12px;
    }

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

    .admin-area {
        width: 100%;
        justify-content: flex-end;
    }

    .admin-profile > div:last-child {
        display: none;
    }

    .summary-card {
        padding: 17px;
    }

    .panel {
        padding: 15px;
    }
}
/* ===== FINAL SCREEN WIDTH FIX ===== */

@media (max-width: 1400px) {

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {

    .sidebar {
        width: 210px;
    }

    .main-content {
        margin-left: 210px;
        width: calc(100% - 210px);
        padding: 20px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {

    .sidebar {
        width: 70px;
    }

    .logo {
        justify-content: center;
        padding: 15px 5px;
    }

    .logo > div:last-child {
        display: none;
    }

    .nav-item {
        justify-content: center;
        font-size: 0;
        padding: 13px 5px;
    }

    .nav-item span {
        font-size: 18px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 15px;
    }

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

    .admin-area {
        width: 100%;
        justify-content: flex-end;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }
}