* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

button,
input,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
    border: none;
}


/* APP */

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


/* SIDEBAR */

.sidebar {
    width: 250px;
    background: #0f172a;
    color: white;
    padding: 25px 15px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 30px;
}

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

.logo h2 {
    font-size: 21px;
}

.logo small {
    color: #94a3b8;
    font-size: 11px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    background: transparent;
    color: #cbd5e1;
    padding: 13px 15px;
    text-align: left;
    border-radius: 8px;
    font-size: 14px;
}

.nav-item span {
    margin-right: 10px;
}

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

.sidebar-bottom {
    position: absolute;
    bottom: 25px;
    left: 15px;
    right: 15px;
}

.sidebar-bottom button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    text-align: left;
    background: transparent;
    color: #94a3b8;
}


/* MAIN */

.main {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 30px;
}

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

.topbar h1 {
    font-size: 26px;
}

.topbar p {
    color: #64748b;
    margin-top: 5px;
    font-size: 14px;
}

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

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

.user small {
    display: block;
    color: #64748b;
    margin-top: 3px;
}


/* PAGES */

.page {
    display: none;
}

.active-page {
    display: block;
}


/* STATS */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.stat-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 7px;
}

.stat-card strong {
    font-size: 22px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
}

.blue {
    background: #dbeafe;
}

.green {
    background: #dcfce7;
}

.orange {
    background: #ffedd5;
}

.red {
    background: #fee2e2;
}


/* CARDS */

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

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

.card-header h3 {
    font-size: 17px;
}

.card-header button {
    background: transparent;
    color: #2563eb;
}


/* DASHBOARD */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}


/* TABLE */

.table-container {
    overflow-x: auto;
}

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

th {
    text-align: left;
    font-size: 12px;
    color: #64748b;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

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

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

.status.paid,
.status.active {
    background: #dcfce7;
    color: #166534;
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.high {
    background: #fee2e2;
    color: #991b1b;
}

.status.medium {
    background: #fef3c7;
    color: #92400e;
}

.status.low {
    background: #dcfce7;
    color: #166534;
}


/* OCCUPANCY */

.occupancy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(#2563eb 67%, #e2e8f0 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circle::before {
    content: "";
    position: absolute;
}

.circle strong {
    font-size: 27px;
}

.circle span {
    font-size: 12px;
    color: #64748b;
}

.occupancy-info p {
    margin: 15px 0;
    font-size: 13px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.green-dot {
    background: #22c55e;
}

.orange-dot {
    background: #f97316;
}


/* SECTION ACTIONS */

.section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-actions h2 {
    margin-bottom: 5px;
}

.section-actions p {
    color: #64748b;
    font-size: 14px;
}


/* BUTTON */

.primary-btn {
    background: #2563eb;
    color: white;
    padding: 11px 18px;
    border-radius: 7px;
    font-weight: 600;
}

.primary-btn:hover {
    background: #1d4ed8;
}

.full {
    width: 100%;
    margin-top: 15px;
}


/* PROPERTIES */

.property-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.property-image {
    height: 130px;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
}

.property-content {
    padding: 18px;
}

.property-content h3 {
    margin-bottom: 6px;
}

.property-location {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 15px;
}

.property-details {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.property-details strong {
    display: block;
    margin-top: 4px;
}


/* MAINTENANCE */

.maintenance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.maintenance-item h4 {
    margin-bottom: 5px;
}

.maintenance-item p {
    color: #64748b;
    font-size: 13px;
}


/* MODAL */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.6);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-box {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 25px;
    border-radius: 12px;
}

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

.modal-header button {
    background: transparent;
    font-size: 25px;
    color: #64748b;
}

form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 14px 0 7px;
}

form input,
form select {
    width: 100%;
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    outline: none;
}

form input:focus,
form select:focus {
    border-color: #2563eb;
}


/* MOBILE */

.mobile-menu {
    display: none;
    background: transparent;
    font-size: 22px;
    margin-right: 10px;
}

@media(max-width: 1000px) {

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

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

}

@media(max-width: 700px) {

    .sidebar {
        transform: translateX(-100%);
        transition: .3s;
        z-index: 50;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .mobile-menu {
        display: inline-block;
    }

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

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

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

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

    .user {
        display: none;
    }

    .section-actions {
        align-items: flex-start;
        gap: 15px;
    }
}
