/* ============================================================
   Fairkey Leases — calm property technology interface
   ============================================================ */

:root {
    --fk-navy: #17324d;
    --fk-navy-700: #234761;
    --fk-teal: #2b8c8c;
    --fk-teal-600: #217575;
    --fk-accent: #c98d42;
    --fk-bg: #f6f8f9;
    --fk-surface: #ffffff;
    --fk-border: #dfe6e9;
    --fk-text: #263b4a;
    --fk-muted: #6d7c85;
    --fk-shadow: 0 2px 5px rgba(23, 50, 77, 0.05), 0 10px 26px rgba(23, 50, 77, 0.06);
    --fk-radius: 12px;
    --fk-radius-sm: 7px;
}

html, body {
    font-family: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: var(--fk-text);
    background-color: var(--fk-bg);
    -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    overflow-x: hidden;
}

img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    max-width: 100%;
}

code, pre {
    overflow-wrap: anywhere;
}

h1, h2, h3, h4, h5 {
    color: var(--fk-navy);
    letter-spacing: -0.035em;
    font-weight: 700;
}

h1:focus {
    outline: none;
}

a {
    color: var(--fk-teal);
}

.eyebrow {
    color: var(--fk-teal-600);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: var(--fk-teal);
    box-shadow: 0 0 0 3px rgba(43, 140, 140, 0.12);
}

/* ---------- Layout shell ---------- */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    background: var(--fk-navy);
    color: #cdd8e4;
}

.top-row {
    background: var(--fk-surface);
    border-bottom: 1px solid var(--fk-border);
    display: flex;
    align-items: center;
    height: 4rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.user-greeting {
    color: var(--fk-muted);
    font-size: 0.85rem;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-title {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: var(--fk-navy);
}

.brand-title span { color: var(--fk-teal-600); }
.brand-title .brand-symbol { color: var(--fk-teal-600); font-size: 1.25rem; margin-right: 0.35rem; }

/* ---------- Authentication ---------- */
.login-shell {
    min-height: calc(100vh - 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-card {
    width: min(100%, 430px);
    background: var(--fk-surface);
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    box-shadow: var(--fk-shadow);
    padding: 2.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--fk-teal); }

.login-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    width: auto;
    height: 58px;
    max-width: min(220px, 80%);
    object-fit: contain;
    border-radius: 8px;
}

.login-tagline {
    color: var(--fk-teal-600);
    margin: 0.8rem 0 1.6rem;
}

.login-card h1 {
    font-size: 1.85rem;
    margin-bottom: 0.5rem;
}

.btn-primary { background: var(--fk-navy); border-color: var(--fk-navy); }
.btn-primary:hover, .btn-primary:focus { background: var(--fk-teal-600); border-color: var(--fk-teal-600); }
.btn-outline-primary { color: var(--fk-navy); border-color: var(--fk-border); }
.btn-outline-primary:hover, .btn-outline-primary:focus { color: var(--fk-navy); background: rgba(33, 212, 194, 0.1); border-color: var(--fk-teal); }

.login-card .btn {
    margin-top: 1.25rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--fk-muted);
    font-size: 0.8rem;
    margin: 1.1rem 0 0;
}

    .login-divider::before,
    .login-divider::after {
        content: "";
        height: 1px;
        flex: 1;
        background: var(--fk-border);
    }

.btn-google {
    background: #fff;
    border: 1px solid var(--fk-border);
    color: var(--fk-text);
}

    .btn-google:hover,
    .btn-google:focus {
        background: #f8fafc;
        border-color: #c7d1dc;
        color: var(--fk-navy);
    }

.google-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 0.35rem;
    border: 1px solid #4285f4;
    border-radius: 50%;
    color: #4285f4;
    font-weight: 700;
    font-size: 0.8rem;
}

.auth-required-card .btn-google {
    margin-top: 0.75rem;
}

.auth-or {
    display: block;
    margin: 0.65rem 0 0;
    color: var(--fk-muted);
    font-size: 0.8rem;
}

.login-note {
    color: var(--fk-muted);
    font-size: 0.78rem;
    margin: 1.25rem 0 1.5rem;
}

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 43, 70, 0.62);
}

.auth-modal {
    position: relative;
    width: min(100%, 430px);
    padding: 2.5rem;
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    background: var(--fk-surface);
    box-shadow: 0 24px 70px rgba(15, 43, 70, 0.28);
    text-align: center;
}

.auth-modal h2 {
    margin-bottom: 0.5rem;
    color: var(--fk-navy);
    font-size: 1.55rem;
}

.auth-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.85rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--fk-muted);
    font-size: 1.65rem;
    line-height: 1;
}

.auth-modal-close:hover,
.auth-modal-close:focus-visible {
    background: var(--fk-bg);
    color: var(--fk-navy);
}

.auth-modal .btn {
    margin-top: 1.25rem;
}

.auth-modal .login-divider {
    margin-top: 1.1rem;
}

.sign-in-options {
    width: 100%;
}

.autocomplete-input {
    position: relative;
    width: 100%;
}

.autocomplete-input-field {
    position: relative;
    z-index: 2;
}

.autocomplete-input.is-open .autocomplete-input-field {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    border-bottom-color: var(--fk-teal);
}

.autocomplete-options {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    z-index: 20;
    overflow: hidden;
    border: 1px solid var(--fk-teal);
    border-top: 0;
    border-radius: 0 0 var(--fk-radius-sm) var(--fk-radius-sm);
    background: var(--fk-surface);
    box-shadow: 0 8px 18px rgba(23, 50, 77, 0.12);
}

.autocomplete-option {
    display: block;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 0;
    border-bottom: 1px solid var(--fk-border);
    background: var(--fk-surface);
    color: var(--fk-text);
    text-align: left;
    cursor: pointer;
}

.autocomplete-option:last-child {
    border-bottom: 0;
}

.autocomplete-option:hover,
.autocomplete-option.highlighted {
    background: rgba(43, 140, 140, 0.1);
    color: var(--fk-navy);
}

@media (max-width: 480px) {
    .auth-modal {
        padding: 2.25rem 1.5rem 1.75rem;
    }
}

.login-back-link {
    font-size: 0.88rem;
    text-decoration: none;
}

.auth-required-card {
    max-width: 520px;
    margin: 4rem auto;
    padding: 2.5rem;
    text-align: center;
    background: var(--fk-surface);
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    box-shadow: var(--fk-shadow);
}

.auth-required-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.auth-required-card h1 {
    font-size: 1.6rem;
}

/* ---------- Product landing ---------- */
.tech-hero {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4rem;
    min-height: 430px;
    margin: -1.5rem -1.5rem 0;
    padding: 5rem clamp(2rem, 7vw, 7rem);
    overflow: hidden;
    color: #e8f6f7;
    background: var(--fk-navy);
}

.tech-hero::before { content: ""; position: absolute; right: -100px; top: -120px; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,0.08); border-radius: 50%; }
.hero-copy, .hero-visual { position: relative; z-index: 1; flex: 1; }
.tech-hero .eyebrow { color: var(--fk-teal); }
.tech-hero h1 { margin: 1rem 0; color: #fff; font-size: clamp(2.5rem, 5vw, 4.4rem); line-height: 0.98; }
.tech-hero h1 span { color: #a8d1d0; }
.tech-hero p { max-width: 560px; color: #c5d2d7; font-size: 1.05rem; line-height: 1.75; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.btn-light-accent { color: var(--fk-navy); background: var(--fk-accent); border: 0; font-weight: 700; }
.btn-light-accent:hover { color: var(--fk-navy); background: #ffd06e; transform: translateY(-1px); }
.hero-caption { color: #79a5ac; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; }
.hero-visual { display: flex; justify-content: center; }
.property-card { width: min(100%, 370px); padding: 1.2rem; border: 1px solid rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); box-shadow: 0 18px 40px rgba(0,0,0,0.16); }
.property-card-header, .property-card-footer { display: flex; justify-content: space-between; color: #79a5ac; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; }
.live-pill { color: var(--fk-teal); }
.property-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0.9rem; margin: 1.2rem 0; }
.property-map { position: relative; min-height: 155px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); background: rgba(43, 140, 140, 0.18); }
.property-map::before { content: ""; position: absolute; inset: 20% -10%; background: repeating-linear-gradient(25deg, transparent 0 19px, rgba(180,246,240,0.17) 20px 21px), repeating-linear-gradient(115deg, transparent 0 25px, rgba(180,246,240,0.14) 26px 27px); transform: rotate(-12deg); }
.map-pin { position: absolute; top: 43%; left: 49%; z-index: 1; color: var(--fk-accent); font-size: 2rem; }
.map-line { position: absolute; z-index: 1; display: block; height: 1px; background: var(--fk-teal); transform-origin: left; }
.line-one { top: 28%; left: 20%; width: 65%; transform: rotate(26deg); }.line-two { top: 70%; left: 10%; width: 75%; transform: rotate(-18deg); }
.property-stats { display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; padding-left: 0.6rem; }.property-stats strong { color: #f4ffff; font-size: 2rem; line-height: 1; }.property-stats span { margin-bottom: 0.8rem; color: #79a5ac; font-size: 0.58rem; letter-spacing: 0.1em; }
.property-card-footer { padding-top: 0.9rem; border-top: 1px solid rgba(33, 212, 194, 0.18); }.property-card-footer span:last-child { color: var(--fk-teal); }
.platform-strip { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--fk-border); color: var(--fk-muted); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; }
.feature-tile { position: relative; border-top: 2px solid var(--fk-teal); border-radius: var(--fk-radius); box-shadow: none; }.feature-index { position: absolute; top: 1.2rem; right: 1.2rem; color: var(--fk-muted); font-size: 0.7rem; font-weight: 700; }.tile-ico { filter: grayscale(0.45); }

@media (max-width: 850px) {
    .tech-hero { gap: 2rem; padding: 4rem 2rem; }
    .tech-hero { min-height: 390px; }
    .property-card { transform: none; }
}

@media (max-width: 600px) {
    .tech-hero { margin: -1rem -1rem 0; padding: 3.5rem 1.25rem; }
    .hero-actions, .platform-strip { align-items: flex-start; flex-direction: column; }
    .platform-strip { gap: 0.55rem; }
    .login-card { padding: 2.25rem 1.35rem; }
}

.content {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
}

/* ---------- Brand / nav ---------- */
.sidebar .navbar-brand,
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-logo .brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    padding: 3px;
}

.brand-tagline {
    color: rgba(205, 216, 228, 0.6);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0.15rem 0 0 2.85rem;
}

.nav-scrollable {
    display: block;
    padding: 0.75rem 0.5rem;
}

.nav-item {
    font-size: 0.95rem;
    padding-bottom: 0.35rem;
}

    .nav-item .nav-link {
        color: #b8c5d4;
        border-radius: var(--fk-radius-sm);
        height: 2.85rem;
        display: flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0 0.9rem;
        font-weight: 500;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

        .nav-item .nav-link .nav-ico {
            font-size: 1.05rem;
            opacity: 0.9;
        }

        .nav-item .nav-link.active {
            background-color: rgba(43, 140, 140, 0.2);
            color: #fff;
            box-shadow: inset 3px 0 0 var(--fk-accent);
        }

        .nav-item .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.07);
            color: #fff;
        }

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    box-shadow: var(--fk-shadow);
    overflow: hidden;
}

.card-header {
    background: var(--fk-surface);
    border-bottom: 1px solid var(--fk-border);
    font-weight: 600;
    color: var(--fk-navy);
    padding: 0.9rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    border-radius: var(--fk-radius);
    padding: 3rem 2.5rem;
    background: var(--fk-navy);
    color: #eaf1f8;
    overflow: hidden;
    box-shadow: none;
}

    .hero::after {
        content: "";
        position: absolute;
        right: -60px;
        top: -60px;
        width: 260px;
        height: 260px;
        background: rgba(201, 141, 66, 0.14);
    }

    .hero h1 {
        color: #fff;
        font-size: clamp(1.8rem, 3vw, 2.6rem);
        font-weight: 700;
        margin-bottom: 0.75rem;
    }

    .hero p {
        color: rgba(234, 241, 248, 0.85);
        max-width: 60ch;
        font-size: 1.05rem;
    }

.hero-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ---------- Feature tiles ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-top: 1.75rem;
}

.feature-tile {
    background: var(--fk-surface);
    border: 1px solid var(--fk-border);
    border-radius: var(--fk-radius);
    padding: 1.4rem;
    box-shadow: var(--fk-shadow);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .feature-tile:hover {
        border-color: var(--fk-teal);
        box-shadow: 0 6px 18px rgba(23, 50, 77, 0.08);
    }

    .feature-tile .tile-ico {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        border-radius: 12px;
        background: rgba(28, 140, 140, 0.1);
        color: var(--fk-teal);
        font-size: 1.35rem;
        margin-bottom: 0.9rem;
    }

    .feature-tile h3 {
        font-size: 1.05rem;
        margin-bottom: 0.35rem;
    }

    .feature-tile p {
        color: var(--fk-muted);
        font-size: 0.9rem;
        margin: 0;
    }

/* ---------- Buttons ---------- */
.btn {
    border-radius: var(--fk-radius-sm);
    font-weight: 500;
    padding: 0.5rem 1.1rem;
}

.btn-primary {
    background-color: var(--fk-teal);
    border-color: var(--fk-teal);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--fk-teal-600);
        border-color: var(--fk-teal-600);
    }

.btn-success {
    background-color: #1f9d6b;
    border-color: #1f9d6b;
}

.btn-light-accent {
    background-color: var(--fk-accent);
    border-color: var(--fk-accent);
    color: #2a1c05;
}

    .btn-light-accent:hover {
        background-color: #d5974a;
        border-color: #d5974a;
        color: #2a1c05;
    }

.btn-sm {
    border-radius: 7px;
}

/* ---------- Fieldset groups ---------- */
fieldset legend {
    color: var(--fk-teal);
    font-weight: 600;
    letter-spacing: 0.02em;
}

fieldset.border {
    border-color: var(--fk-border) !important;
    border-radius: var(--fk-radius-sm) !important;
    background: #fbfcfe;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fk-muted);
    margin-bottom: 0.25rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border-color: var(--fk-border);
    min-height: 2.5rem;
    width: 100%;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--fk-teal);
        box-shadow: 0 0 0 0.2rem rgba(28, 140, 140, 0.15);
    }

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: var(--fk-surface);
}

.lease-table {
    border-radius: var(--fk-radius);
    box-shadow: var(--fk-shadow);
    margin-bottom: 0;
    /* border-collapse: collapse breaks position: sticky on cells, so use separate. */
    border-collapse: separate;
    border-spacing: 0;
}

    .lease-table thead.table-dark th {
        background-color: var(--fk-navy);
        border-color: var(--fk-navy-700);
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .lease-table th, .lease-table td {
        font-size: 0.85rem;
        vertical-align: middle;
    }

    /* Short/numeric columns shouldn't wrap; long text columns may. */
    .lease-table td:not(.col-premises):not(.actions-cell) {
        white-space: nowrap;
    }

    .lease-table .col-premises {
        white-space: normal;
        min-width: 200px;
        max-width: 280px;
    }

    .lease-table .col-actions {
        width: 1%;
    }

    .lease-table tbody tr:hover {
        background-color: rgba(28, 140, 140, 0.04);
    }

/* Keep the Actions column on one line and pinned to the right so it stays visible. */
.lease-table th.col-actions,
.lease-table td.actions-cell {
    position: sticky;
    right: 0;
    z-index: 2;
    white-space: nowrap;
    box-shadow: -6px 0 8px -6px rgba(15, 43, 70, 0.18);
}

.lease-table td.actions-cell {
    background-color: var(--fk-surface);
}

.lease-table tbody tr:nth-of-type(odd) td.actions-cell {
    /* Match the striped row background so the sticky cell blends in. */
    background-color: #f4f6f9;
}

.lease-table tbody tr:hover td.actions-cell {
    background-color: #eef6f6;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.lease-table th.col-actions {
    background-color: var(--fk-navy);
}

@media (max-width: 640px) {
    .card-header,
    .card-body {
        padding: 0.9rem;
    }

    fieldset.border {
        padding: 0.85rem !important;
    }

    fieldset .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.7rem;
    }

    .form-label {
        font-size: 0.78rem;
    }

    .form-control,
    .form-select,
    textarea.form-control {
        font-size: 16px;
    }

    .lease-table {
        min-width: 860px;
    }

    .lease-table th,
    .lease-table td {
        font-size: 0.78rem;
        padding: 0.55rem 0.5rem;
    }

    .lease-table .col-premises {
        min-width: 180px;
    }

    .row-actions .btn {
        min-width: 2rem;
        min-height: 2rem;
    }

    .auth-modal-backdrop {
        align-items: flex-start;
        overflow-y: auto;
        padding: 0.75rem;
    }

    .auth-modal {
        width: 100%;
        max-height: calc(100dvh - 1.5rem);
        overflow-y: auto;
        padding: 2.25rem 1.1rem 1.5rem;
    }

    .auth-modal .btn {
        min-height: 2.75rem;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-body {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

.row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

    .row-actions .btn {
        padding: 0.25rem 0.5rem;
        line-height: 1;
    }

    .row-actions .act-ico {
        font-size: 0.9rem;
    }

/* ---------- Section headings ---------- */
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--fk-navy);
}

.text-muted {
    color: var(--fk-muted) !important;
}

/* ---------- Validation ---------- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e5484d;
}

.validation-message {
    color: #e5484d;
}

/* ---------- Error UI ---------- */
#blazor-error-ui {
    background: #fff7e6;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ---------- Responsive ---------- */
@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 260px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    main {
        flex: 1;
        min-width: 0;
    }
}

/* ---------- Responsive shell and content ---------- */
@media (max-width: 1200px) {
    .content {
        padding-inline: clamp(1rem, 3vw, 2rem) !important;
    }

    .tech-hero {
        gap: clamp(1.5rem, 4vw, 4rem);
        padding-inline: clamp(2rem, 5vw, 5rem);
    }
}

@media (max-width: 900px) and (min-width: 641px) {
    .sidebar {
        width: 210px;
    }

    .brand-title {
        font-size: 0.78rem;
        letter-spacing: 0.08em;
    }

    .user-greeting {
        max-width: 170px;
    }

    .tech-hero {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
    }

    .hero-visual {
        width: 100%;
    }

    .property-card {
        margin-inline: auto;
    }
}

@media (max-width: 640px) {
    .page {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1rem !important;
    }

    .sidebar-brand .brand-tagline {
        margin: 0 0 0 auto;
    }

    .nav-scrollable {
        padding: 0.25rem 0.75rem 0.8rem;
        overflow-x: auto;
    }

    .nav-scrollable nav {
        display: flex;
        gap: 0.35rem;
        min-width: max-content;
    }

    .nav-item {
        padding: 0;
    }

    .nav-item .nav-link {
        height: 2.5rem;
        padding-inline: 0.75rem;
        white-space: nowrap;
    }

    .top-row {
        min-height: 4.25rem;
        height: auto;
        padding-block: 0.7rem !important;
        gap: 0.75rem;
    }

    .brand-title {
        min-width: 0;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        line-height: 1.25;
    }

    .user-menu {
        flex-shrink: 0;
        gap: 0.4rem;
    }

    .user-greeting {
        display: none;
    }

    .content {
        padding: 1rem 0.85rem 2rem !important;
    }

    .tech-hero {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        margin: -1rem -0.85rem 0;
        padding: 3.25rem 1.1rem 2.75rem;
    }

    .tech-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.4rem);
    }

    .tech-hero p {
        font-size: 0.96rem;
        line-height: 1.6;
    }

    .hero-actions {
        align-items: stretch;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-caption {
        line-height: 1.5;
    }

    .hero-visual {
        display: block;
        width: 100%;
    }

    .property-card {
        width: 100%;
    }

    .property-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(90px, 0.85fr);
    }

    .platform-strip {
        padding-block: 0.9rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .feature-tile {
        padding: 1.15rem;
    }

    .login-shell {
        min-height: calc(100vh - 7rem);
        padding: 1rem 0;
    }

    .login-card,
    .auth-required-card {
        width: 100%;
        padding: 2rem 1.1rem;
    }
}

@media (max-width: 380px) {
    .brand-title .brand-symbol {
        display: none;
    }

    .top-row .btn {
        padding-inline: 0.55rem;
        font-size: 0.75rem;
    }

    .property-grid {
        grid-template-columns: 1fr;
    }

    .property-map {
        min-height: 120px;
    }
}
