@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

html,
body,
button,
input,
select,
textarea,
table,
a {
    font-family: 'Cairo', Tahoma, Arial, sans-serif !important;
}


:root {
    --primary: #176b5c;
    --dark: #102a27;
    --bg: #f3f6f5;
    --border: #dce5e2;
    --muted: #71807d;
    --danger: #c73a3a
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Tahoma,Arial,sans-serif;
    background: var(--bg);
    color: #213330
}

a {
    color: var(--primary);
    text-decoration: none
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 245px;
    background: var(--dark);
    color: white;
    padding: 24px 16px
}

.brand {
    font-size: 24px;
    font-weight: bold;
    padding: 8px 12px 28px
}

    .brand small {
        display: block;
        font-size: 11px;
        color: #9dbbb5;
        margin-top: 6px
    }

.sidebar nav {
    display: grid;
    gap: 7px
}

    .sidebar nav a {
        color: #dbe9e6;
        padding: 13px 15px;
        border-radius: 10px
    }

        .sidebar nav a:hover {
            background: #1c4741;
            color: white
        }

main {
    margin-right: 245px;
    min-height: 100vh
}

header {
    height: 66px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
    padding: 0 30px
}

    header form {
        margin: 0
    }

.link {
    border: 0;
    background: none;
    color: var(--danger);
    cursor: pointer
}

.content {
    padding: 28px;
    max-width: 1500px;
    margin: auto
}

.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px
}

    .page-title h1 {
        margin: 0;
        font-size: 27px
    }

    .page-title p {
        margin: 7px 0 0;
        color: var(--muted)
    }

.primary, .secondary, button {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 11px 17px;
    cursor: pointer;
    font: inherit
}

.primary {
    background: var(--primary);
    color: white
}

.secondary {
    background: #e1eeeb;
    color: var(--primary)
}

.wide {
    width: 100%
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 20px;
    box-shadow: 0 2px 8px #102a2708
}

.stats {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 13px;
    margin-bottom: 22px
}

.stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px
}

    .stat b {
        font-size: 25px;
        display: block;
        color: var(--primary)
    }

    .stat span, small {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-top: 7px
    }

.money {
    grid-column: span 1
}

.grid2 {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 20px
}

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

th, td {
    text-align: right;
    padding: 13px 10px;
    border-bottom: 1px solid #edf1ef;
    font-size: 14px
}

th {
    color: var(--muted);
    font-size: 12px
}

.badge {
    background: #e3f1ee;
    color: var(--primary);
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px
}

.task {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #edf1ef;
    padding: 13px 0
}

    .task time {
        font-size: 12px;
        color: var(--muted)
    }

.filters {
    display: flex;
    gap: 10px;
    background: white;
    border: 1px solid var(--border);
    padding: 13px;
    border-radius: 11px;
    margin-bottom: 17px
}

    .filters input {
        flex: 1
    }

input, select, textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #cad7d3;
    border-radius: 7px;
    background: white;
    font: inherit
}

textarea {
    min-height: 85px
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 18px
}

    .form-grid label {
        font-size: 13px;
        font-weight: bold
    }

        .form-grid label input, .form-grid label select, .form-grid label textarea {
            margin-top: 7px;
            font-weight: normal
        }

.full {
    grid-column: 1/-1
}

.check {
    display: flex;
    align-items: center;
    gap: 8px
}

    .check input {
        width: auto
    }

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

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

    .details b {
        display: block;
        margin-top: 7px
    }

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

.property-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden
}

.property-photo {
    height: 120px;
    background: linear-gradient(135deg,#d7e9e5,#edf4f2);
    display: grid;
    place-items: center;
    font-size: 50px
}

.pbody {
    padding: 17px
}

    .pbody h3 {
        margin: 12px 0 7px
    }

    .pbody strong {
        display: block;
        font-size: 20px;
        color: var(--primary);
        margin-top: 13px
    }

    .pbody footer {
        display: flex;
        gap: 18px;
        border-top: 1px solid #edf1ef;
        margin-top: 15px;
        padding-top: 13px
    }

.overdue {
    background: #fff5f5
}

.small-btn {
    padding: 6px 10px;
    background: #e4f1ee;
    color: var(--primary)
}

.error {
    color: var(--danger);
    margin: 10px 0
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg,#102a27,#176b5c)
}

.login-card {
    width: min(410px,92vw);
    background: white;
    border-radius: 18px;
    padding: 35px;
    box-shadow: 0 20px 70px #0005
}

    .login-card h1 {
        text-align: center
    }

    .login-card p {
        text-align: center;
        color: var(--muted);
        margin-bottom: 28px
    }

    .login-card label {
        display: block;
        margin: 14px 0 7px
    }

    .login-card button {
        margin-top: 20px
    }

    .login-card small {
        text-align: center;
        margin-top: 20px
    }

/* =========================================================
   Corrected sidebar and responsive layout
   ========================================================= */

:root {
    --sidebar-width: 220px;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 18px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--dark);
    color: #fff;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
}

.sidebar .brand {
    padding: 6px 11px 18px;
    font-size: 22px;
    line-height: 1.4;
    text-align: right;
}

.sidebar .brand small {
    display: block;
    margin-top: 5px;
    color: #91aaa5;
    font-size: 10px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 41px;
    padding: 9px 12px;
    color: #dbe9e6;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: 9px;
    transition: background-color .2s ease, color .2s ease;
}

.sidebar nav a:hover,
.sidebar nav a:focus {
    color: #fff;
    background: #1c4741;
}

main {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-right: var(--sidebar-width);
}

.content {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 200px;
    }

    .sidebar {
        padding: 15px 9px;
    }

    .sidebar nav a {
        padding: 8px 10px;
        font-size: 12px;
    }

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

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

@media (max-width: 768px) {
    body {
        display: block;
    }

    .sidebar {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        min-height: 0;
        padding: 12px;
        overflow: hidden;
    }

    .sidebar .brand {
        padding: 4px 8px 11px;
    }

    .sidebar .brand small {
        display: none;
    }

    .sidebar nav {
        display: flex;
        flex-direction: row;
        gap: 7px;
        padding-bottom: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .sidebar nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar nav a {
        flex: 0 0 auto;
        width: auto;
        min-height: 38px;
        padding: 8px 12px;
        font-size: 11px;
    }

    main {
        width: 100%;
        margin-right: 0;
    }

    header {
        display: none;
    }

    .content {
        padding: 14px;
    }

    .grid2,
    .form-grid,
    .details,
    .property-grid {
        grid-template-columns: 1fr;
    }

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

    .filters {
        flex-direction: column;
    }

    .page-title {
        align-items: flex-start;
        gap: 12px;
    }

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

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 10px;
    }
}

/* =========================================================
   Modern application shell
   ========================================================= */

:root {
    --sidebar-width: 252px;
    --topbar-height: 76px;
    --sidebar-bg: #0b302a;
    --sidebar-hover: rgba(255, 255, 255, .07);
    --sidebar-active: #1c806d;
}

.sidebar {
    width: var(--sidebar-width);
    padding: 18px 14px 14px;
    background: linear-gradient(180deg, #0b302a 0%, #092a25 100%);
    box-shadow: -10px 0 30px rgba(6, 38, 33, .08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 62px;
    padding: 7px 8px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-logo {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    color: #0b6153;
    background: #fff;
    border-radius: 13px;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
}

.sidebar-brand strong {
    display: block;
    color: #fff;
    font-size: 20px;
    line-height: 1.2;
}

.sidebar-brand small {
    display: block;
    margin-top: 5px;
    color: #80a9a1;
    font-size: 8px;
    letter-spacing: .7px;
}

.sidebar-close {
    display: none;
    width: 34px;
    height: 34px;
    margin-right: auto;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.sidebar-section-title {
    padding: 20px 12px 8px;
    color: #6f9991;
    font-size: 9px;
    font-weight: 700;
}

.sidebar-section-title.inner {
    padding-top: 19px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding: 9px 12px;
    color: #c7ddd8;
    font-size: 12px;
    font-weight: 600;
    border-radius: 11px;
}

.sidebar-nav a i {
    width: 22px;
    color: #82aca4;
    font-size: 16px;
    text-align: center;
}

.sidebar-nav a:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar-nav a.active {
    color: #fff;
    background: linear-gradient(100deg, #1a7a68, #176b5c);
    box-shadow: 0 8px 20px rgba(3, 26, 22, .22);
}

.sidebar-nav a.active i {
    color: #fff;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    top: 11px;
    right: -14px;
    width: 3px;
    height: 23px;
    background: #7fe0c9;
    border-radius: 5px 0 0 5px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 22px;
    padding: 12px 9px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 13px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    color: #fff;
    background: linear-gradient(135deg, #29a58d, #176b5c);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
}

.user-avatar.small {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
    border-radius: 10px;
}

.sidebar-user > div {
    min-width: 0;
    flex: 1;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong {
    color: #fff;
    font-size: 10px;
}

.sidebar-user small {
    margin: 3px 0 0;
    color: #83aaa2;
    font-size: 8px;
}

.sidebar-user > a {
    color: #8eb4ad;
    font-size: 14px;
}

.app-main,
main {
    width: calc(100% - var(--sidebar-width));
    margin-right: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 26px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid #e4ebe9;
    backdrop-filter: blur(12px);
}

.topbar-title,
.topbar-actions,
.account-chip {
    display: flex;
    align-items: center;
}

.topbar-title {
    gap: 12px;
}

.topbar-title span {
    display: block;
    color: #8a9894;
    font-size: 9px;
}

.topbar-title h2 {
    margin: 2px 0 0;
    color: #173b35;
    font-size: 18px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #176b5c;
    background: #e9f3f1;
    font-size: 22px;
}

.topbar-actions {
    gap: 9px;
}

.topbar-actions form {
    margin: 0;
}

.topbar-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #49635e;
    background: #f4f7f6;
    border: 1px solid #e3eae8;
    border-radius: 11px;
}

.topbar-icon > span {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 6px;
    height: 6px;
    background: #e15050;
    border: 2px solid #fff;
    border-radius: 50%;
}

.account-chip {
    gap: 9px;
    min-width: 165px;
    padding: 5px 7px;
    color: #173b35;
    background: #fff;
    border: 1px solid #e2e9e7;
    border-radius: 12px;
}

.account-chip > div {
    flex: 1;
}

.account-chip strong,
.account-chip small {
    display: block;
}

.account-chip strong {
    font-size: 10px;
}

.account-chip small {
    margin: 2px 0 0;
    color: #879590;
    font-size: 8px;
}

.account-chip > i {
    color: #94a09d;
    font-size: 10px;
}

.logout-button {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    color: #be3c3c;
    background: #fff2f2;
    border: 1px solid #f6dddd;
    font-size: 10px;
}

.content {
    padding: 22px 24px 30px;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 225px;
    }

    .account-chip {
        min-width: 145px;
    }
}

@media (max-width: 850px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: -270px;
        width: 255px;
        height: 100vh;
        transition: right .25s ease;
    }

    .sidebar.open {
        right: 0;
    }

    .sidebar-close,
    .menu-toggle {
        display: grid;
        place-items: center;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 950;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(8, 30, 27, .48);
        transition: .25s ease;
    }

    .sidebar-overlay.show {
        visibility: visible;
        opacity: 1;
    }

    .app-main,
    main {
        width: 100%;
        margin-right: 0;
    }

    .topbar {
        display: flex;
        height: 68px;
        padding: 0 14px;
    }

    .account-chip {
        min-width: auto;
        padding: 4px;
    }

    .account-chip > div,
    .account-chip > i,
    .logout-button span {
        display: none;
    }

    .content {
        padding: 14px;
    }
}

@media (max-width: 520px) {
    .topbar-title span {
        display: none;
    }

    .topbar-title h2 {
        font-size: 15px;
    }

    .topbar-icon {
        display: none;
    }
}

/* Phase 1: usability */
.sidebar-collapse{width:40px;height:40px;display:grid;place-items:center;padding:0;color:#176b5c;background:#e9f3f1;font-size:18px}.sidebar,.app-main,main{transition:width .25s ease,margin-right .25s ease}.sidebar-collapsed{--sidebar-width:82px}.sidebar-collapsed .sidebar-brand>div,.sidebar-collapsed .sidebar-section-title,.sidebar-collapsed .sidebar-nav a span,.sidebar-collapsed .sidebar-user>div,.sidebar-collapsed .sidebar-user>a{display:none}.sidebar-collapsed .sidebar-brand{justify-content:center}.sidebar-collapsed .sidebar-nav a{justify-content:center;padding:9px}.sidebar-collapsed .sidebar-nav a i{font-size:19px}.sidebar-collapsed .sidebar-user{justify-content:center}.global-search{position:relative;width:min(360px,30vw);margin:0!important}.global-search>i{position:absolute;right:13px;top:50%;transform:translateY(-50%);color:#82918d}.global-search input{height:42px;padding:9px 38px 9px 12px;background:#f7f9f8;border-color:#e2e9e7;border-radius:12px;font-size:11px}.notification-wrap{position:relative}.notification-button{border:0;padding:0}.notification-button .notification-count{position:absolute;top:-5px;left:-5px;min-width:18px;height:18px;display:grid;place-items:center;padding:0 4px;color:#fff;background:#e14a4a;border:2px solid #fff;border-radius:20px;font-size:8px}.notification-menu{position:absolute;top:50px;left:0;width:330px;visibility:hidden;opacity:0;transform:translateY(-7px);background:#fff;border:1px solid #e1e9e7;border-radius:15px;box-shadow:0 18px 50px rgba(23,59,53,.16);transition:.18s;overflow:hidden}.notification-wrap.open .notification-menu{visibility:visible;opacity:1;transform:none}.notification-menu header{position:static;height:auto;display:flex;justify-content:space-between;padding:14px 15px;background:#fff}.notification-menu header b,.notification-menu header small{display:block}.notification-menu header small{margin:2px 0 0;font-size:8px}.notification-menu header a{font-size:9px}.notification-item{display:flex;align-items:center;gap:10px;padding:12px 15px;color:#24453f;border-top:1px solid #edf1f0}.notification-item>i{width:33px;height:33px;display:grid;place-items:center;color:#176b5c;background:#e7f2ef;border-radius:10px}.notification-item b,.notification-item small{display:block}.notification-item b{font-size:10px}.notification-item small{margin:3px 0 0;font-size:8px}.notification-item.danger-item>i{color:#c94444;background:#fff0f0}.notification-empty{padding:30px;text-align:center;color:#82918d}.notification-empty i{display:block;font-size:25px;margin-bottom:7px}.flash-message{display:flex;align-items:center;gap:10px;padding:13px 15px;margin-bottom:15px;border-radius:11px;transition:.3s}.flash-message.hide{opacity:0;transform:translateY(-8px)}.flash-message span{flex:1;font-size:11px}.flash-message button{padding:0;background:none;font-size:18px}.success-flash{color:#126945;background:#e7f6ee;border:1px solid #c8ead8}.error-flash{color:#a52f2f;background:#fff0f0;border:1px solid #f3d2d2}.advanced-filters{display:grid;grid-template-columns:2fr repeat(3,1fr) auto auto;align-items:end}.property-filters{grid-template-columns:2fr repeat(6,1fr) auto auto}.filter-search{position:relative}.filter-search i{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:#82918d}.filter-search input{padding-right:35px}.filter-reset{display:grid;place-items:center;min-height:42px;padding:0 12px;background:#eef3f2;border-radius:8px;font-size:10px}.table-person{display:flex;align-items:center;gap:9px}.table-person>span{width:34px;height:34px;display:grid;place-items:center;color:#176b5c;background:#e3f1ee;border-radius:10px;font-weight:800}.table-person b,.table-person small{display:block}.status-badge{display:inline-block;padding:5px 9px;color:#176b5c;background:#e4f2ef;border-radius:20px;font-size:9px}.row-actions{display:flex;gap:5px}.row-actions a,.row-actions button{width:31px;height:31px;display:grid;place-items:center;padding:0;background:#edf4f2;border-radius:8px}.row-actions form{margin:0}.row-actions .delete-action,.delete-link{color:#c63d3d;background:#fff0f0}.empty-table,.empty-state{padding:35px;text-align:center;color:#81908c}.empty-table i,.empty-state>i{display:block;font-size:28px;margin-bottom:8px}.property-card-top{display:flex;justify-content:space-between;align-items:center}.property-photo.image{width:100%;object-fit:cover}.property-photo i{font-size:35px;color:#2b7b6d}.pbody p i{color:#4e8d81}.pbody footer form{margin-right:auto}.delete-link{width:30px;height:30px;padding:0}.pagination{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:18px}.pagination a{width:34px;height:34px;display:grid;place-items:center;color:#47635e;background:#fff;border:1px solid #dfe7e5;border-radius:9px;font-size:10px}.pagination a.active{color:#fff;background:#176b5c;border-color:#176b5c}.pagination a.disabled{pointer-events:none;opacity:.4}.pagination>span{margin-right:8px;color:#82908c;font-size:9px}.search-page-form{display:flex;gap:8px;position:relative;margin-bottom:18px}.search-page-form>i{position:absolute;right:14px;top:50%;transform:translateY(-50%)}.search-page-form input{padding-right:40px}.search-results-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.search-results-grid .full-search{grid-column:1/-1}.search-results-grid h3{margin-top:0}.search-results-grid h3 span{font-size:9px;background:#e6f2ef;padding:3px 7px;border-radius:20px}.result-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-top:1px solid #edf1f0}.result-row b,.result-row small{display:block}.result-row b{font-size:11px}.result-row small{font-size:9px}.result-row>i{font-size:10px}@media(max-width:1150px){.advanced-filters,.property-filters{grid-template-columns:repeat(3,1fr)}.global-search{width:240px}}@media(max-width:850px){.sidebar-collapse{display:none}.global-search{display:none}.advanced-filters,.property-filters{grid-template-columns:1fr 1fr}.search-results-grid{grid-template-columns:1fr}.search-results-grid .full-search{grid-column:auto}}@media(max-width:520px){.advanced-filters,.property-filters{grid-template-columns:1fr}.notification-menu{position:fixed;top:70px;left:10px;right:10px;width:auto}}

/* Property management - Phase 2 */
.property-form{display:grid;gap:18px}.feature-options{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.feature-options label{display:flex;align-items:center;gap:8px;padding:12px;border:1px solid var(--border,#dfe7e4);border-radius:10px;background:#f8fbfa}.property-dropzone{border:2px dashed #91bdb2;border-radius:14px;background:#f4faf8;padding:30px;text-align:center;display:flex;flex-direction:column;gap:6px;cursor:pointer}.property-dropzone.drag{background:#def3ed;border-color:#0c4b42}.property-dropzone>i{font-size:38px;color:#0c4b42}.property-dropzone span,.image-help{font-size:12px;color:#71807d}.property-image-preview{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:15px}.property-image-item{height:130px;position:relative;border:3px solid transparent;border-radius:10px;overflow:hidden}.property-image-item.main{border-color:#e5b500}.property-image-item img{width:100%;height:100%;object-fit:cover}.property-image-item button{position:absolute;top:6px;width:30px;height:30px;border:0;border-radius:7px;background:#fff;cursor:pointer}.set-main-image{right:6px;color:#aaa}.delete-property-image{left:6px;color:#c33}.property-image-item.main .set-main-image{color:#e5b500}.property-image-item small{display:none;position:absolute;right:0;left:0;bottom:0;text-align:center;background:#0c4b42e8;color:#fff;padding:4px}.property-image-item.main small{display:block}.map-picker iframe,.property-map{width:100%;height:290px;border:0;border-radius:12px;background:#eef2f1}.property-gallery{display:grid;grid-template-columns:2fr repeat(2,1fr);grid-auto-rows:190px;gap:8px;margin-bottom:18px}.property-gallery button{border:0;padding:0;overflow:hidden;position:relative;cursor:pointer}.property-gallery .gallery-main{grid-row:span 2;border-radius:0 14px 14px 0}.property-gallery img{width:100%;height:100%;object-fit:cover}.property-gallery span{position:absolute;bottom:10px;right:10px;padding:6px 10px;background:#0c4b42dd;color:#fff;border-radius:7px}.duplicate-warning{display:flex;align-items:center;gap:12px;background:#fff6dd;border:1px solid #f1d17d;border-radius:12px;padding:14px;margin-bottom:18px}.duplicate-warning>i{font-size:24px;color:#db9e00}.duplicate-warning div:nth-child(2){display:flex;flex:1;flex-direction:column}.duplicate-warning span{font-size:11px}.duplicate-warning a{margin:3px}.property-details-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:18px}.property-details-content{display:grid;gap:18px}.section-title{display:flex;justify-content:space-between}.property-price{font-size:22px;color:#0c4b42}.phase2-details{display:grid!important;grid-template-columns:repeat(3,1fr)}.property-features{display:flex;gap:10px;flex-wrap:wrap}.property-features span{background:#eaf5f2;color:#0c4b42;padding:9px 12px;border-radius:9px}.property-features i{margin-left:5px}.owner-private{display:flex;flex-direction:column;gap:8px}.owner-private small{color:#888}.property-history>div{display:flex;gap:10px;padding:11px 0;border-bottom:1px solid #edf1f0}.property-history p{display:flex;flex-direction:column;margin:0}.property-history span,.property-history small{font-size:11px;color:#71807d}.gallery-lightbox{display:none;position:fixed;z-index:9999;inset:0;background:#000d;align-items:center;justify-content:center}.gallery-lightbox.show{display:flex}.gallery-lightbox img{max-width:88vw;max-height:82vh}.gallery-lightbox button{position:absolute;top:20px;left:25px;border:0;background:transparent;color:#fff;font-size:25px}@media(max-width:900px){.feature-options{grid-template-columns:repeat(2,1fr)}.property-image-preview{grid-template-columns:repeat(3,1fr)}.property-details-layout{grid-template-columns:1fr}.property-gallery{grid-auto-rows:130px}}@media(max-width:560px){.feature-options,.phase2-details{grid-template-columns:1fr 1fr}.property-image-preview{grid-template-columns:repeat(2,1fr)}.property-gallery{display:flex;overflow:auto}.property-gallery button{min-width:85%;height:240px}.property-gallery .gallery-main{border-radius:12px}}

/* Sales and clients - Phase 3 */
.kanban-filter{display:flex;gap:8px;margin-bottom:14px}.kanban-filter select{max-width:260px}.kanban-board{display:flex;gap:12px;overflow-x:auto;padding:4px 2px 18px;min-height:560px}.kanban-column{min-width:285px;width:285px;background:#eef3f2;border-radius:14px;padding:10px}.kanban-column>header{display:flex;justify-content:space-between;align-items:center;padding:7px}.kanban-column>header span{min-width:25px;height:25px;display:grid;place-items:center;background:#fff;border-radius:20px;font-size:10px}.kanban-dropzone{min-height:490px;padding:5px;border-radius:10px;transition:.2s}.kanban-dropzone.drag-over{background:#dceee9}.kanban-card{background:#fff;border:1px solid #e0e8e6;border-radius:11px;padding:12px;margin-bottom:9px;box-shadow:0 4px 13px #173b3510;cursor:grab}.kanban-card.dragging{opacity:.45}.kanban-card.stale{border-right:4px solid #e34b4b}.kanban-card>div,.kanban-card footer{display:flex;justify-content:space-between;gap:8px}.kanban-card small{display:block;margin-top:7px;color:#73827f;font-size:9px}.kanban-card footer{border-top:1px solid #edf1f0;margin-top:10px;padding-top:8px;font-size:8px}.kanban-card footer span{color:#ad6900}.bulk-toolbar{display:flex;gap:8px;align-items:center;margin:10px 0}.bulk-toolbar b{margin-left:auto}.bulk-toolbar select{max-width:230px}.stale-filter{display:flex!important;align-items:center;gap:5px;white-space:nowrap}.stale-client{background:#fff9f8}.text-danger{color:#d33}.client-details-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:18px}.client-details-grid>div{display:grid;gap:18px}.client-details-grid aside{display:grid;gap:18px;align-content:start}.client-timeline article{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid #edf1f0}.client-timeline article>i{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#e5f2ef;color:#176b5c}.client-timeline p{margin:4px 0;color:#687874}.client-timeline small{font-size:9px;color:#84918e}.quick-activity{display:grid;gap:9px}.stage-duration-list>div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #edf1f0;font-size:10px}.stage-duration-list span{color:#778581}@media(max-width:850px){.client-details-grid{grid-template-columns:1fr}.bulk-toolbar{flex-wrap:wrap}.kanban-column{min-width:260px;width:260px}}
/* ======================================
   CRM LOGIN
====================================== */

.login-page {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Tahoma, sans-serif;
    background: radial-gradient(circle at 10% 15%, rgba(26, 120, 96, .08), transparent 15%), radial-gradient(circle at 90% 20%, rgba(26, 120, 96, .08), transparent 15%), linear-gradient( 160deg, #f8fbfa 0%, #ffffff 52%, #edf6f3 52%, #0e5147 53%, #063d37 100% );
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    position: relative;
    overflow-x: hidden;
}


.login-wrapper {
    width: 100%;
    max-width: 1050px;
    padding: 35px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.login-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255,255,255,.98);
    padding: 42px 42px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 55px rgba(0, 55, 45, .20);
    border: 1px solid #e1ebe8;
}


.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}


    .login-logo h1 {
        margin: 0;
        color: #162827;
        font-size: 35px;
        font-weight: 800;
    }


        .login-logo h1 span {
            color: #19765f;
            margin-right: 5px;
        }


.logo-icon {
    font-size: 42px;
}


.login-subtitle {
    text-align: center;
    color: #71807d;
    margin: 0 0 22px;
    font-size: 15px;
}


.demo-badge {
    background: #e7f6ef;
    color: #19765f;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    margin-bottom: 25px;
}


.form-group {
    margin-bottom: 18px;
}


    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 600;
        color: #3b5853;
    }


.input-box {
    position: relative;
}


    .input-box input {
        width: 100%;
        height: 54px;
        box-sizing: border-box;
        border: 1px solid #d4e0dd;
        border-radius: 10px;
        background: #fff;
        outline: none;
        font-size: 15px;
        padding: 0 48px 0 48px;
        transition: .2s;
    }


        .input-box input:focus {
            border-color: #19765f;
            box-shadow: 0 0 0 4px rgba(25, 118, 95, .10);
        }


.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}


.password-toggle {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    opacity: .6;
}


.login-btn {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 10px;
    margin-top: 8px;
    background: linear-gradient( 135deg, #148164, #176853 );
    color: #fff;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(24, 117, 92, .20);
    transition: .2s;
}


    .login-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 22px rgba(24, 117, 92, .28);
    }


    .login-btn span {
        margin-right: 8px;
    }


.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #889995;
}


    .login-divider::before,
    .login-divider::after {
        content: "";
        height: 1px;
        background: #dce6e3;
        flex: 1;
    }


.demo-btn {
    width: 100%;
    height: 55px;
    border-radius: 10px;
    border: 1px solid #19765f;
    background: #fff;
    color: #19765f;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: .2s;
}


    .demo-btn:hover {
        background: #eff9f6;
        transform: translateY(-1px);
    }


.login-error {
    color: #c0392b;
    font-size: 13px;
    margin-bottom: 15px;
}


    .login-error ul {
        margin: 0;
        padding-right: 20px;
    }


.login-footer {
    text-align: center;
    margin-top: 27px;
    padding-top: 20px;
    border-top: 1px solid #edf1f0;
    color: #788783;
    font-size: 13px;
}


    .login-footer small {
        display: block;
        margin-top: 5px;
    }


/* =========================
   Features
========================= */

.login-features {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 45px;
    color: white;
}


.feature {
    display: flex;
    gap: 13px;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-left: 1px solid rgba(255,255,255,.15);
}


    .feature:last-child {
        border-left: 0;
    }


.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(93, 203, 157, .25);
    font-size: 22px;
}


.feature strong {
    display: block;
    font-size: 15px;
    margin-bottom: 5px;
}


.feature span {
    display: block;
    font-size: 12px;
    opacity: .75;
}


.demo-note {
    color: white;
    background: rgba(255,255,255,.10);
    margin-top: 20px;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 12px;
}


/* =========================
   Responsive
========================= */

@media(max-width:800px) {

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


@media(max-width:520px) {

    .login-wrapper {
        padding: 20px 14px;
    }

    .login-card {
        padding: 30px 22px 25px;
        border-radius: 18px;
    }

    .login-logo h1 {
        font-size: 28px;
    }

    .login-features {
        grid-template-columns: 1fr;
    }

    .feature {
        justify-content: flex-start;
        border-left: 0;
        border-bottom: 1px solid rgba(255,255,255,.12);
    }
}