/* ============================================
   Rental Tracker Admin — Global Polished Styles
   ============================================ */

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

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --primary: #3498db;
    --primary-hover: #2980b9;
    --primary-light: rgba(52, 152, 219, 0.08);
    --primary-ring: rgba(52, 152, 219, 0.2);
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --bg-header: #f1f3f9;
    --bg-hover: #eaf4fb;
    --border: #e5e7eb;
    --border-light: #f0f0f5;
    --text: #1a1d26;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --radius: 10px;
    --radius-sm: 6px;
    --green: #10b981;
    --green-bg: #ecfdf5;
    --green-text: #065f46;
    --red: #ef4444;
    --red-bg: #fef2f2;
    --red-text: #991b1b;
    --amber: #f59e0b;
    --amber-bg: #fffbeb;
    --amber-text: #92400e;
    --blue: #3b82f6;
    --blue-bg: #eff6ff;
    --blue-text: #1e40af;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
    background: var(--bg);
    margin: 0;
}

/* ---- Layout ---- */
.layout-wrapper { display: flex; min-height: 100vh; }

.side-nav {
    width: 240px;
    background: #2c3e50;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.nav-brand {
    color: #9CC9E5;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 450;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    letter-spacing: -0.1px;
}

.nav-link:hover {
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.05);
    border-left-color: rgba(156,201,229,0.5);
}

.nav-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 8px 24px;
}

.main-content {
    flex: 1;
    background: var(--bg);
    overflow-y: auto;
    min-height: 100vh;
}

.content { padding: 0; }

@media (max-width: 768px) {
    .side-nav { display: none; }
    .layout-wrapper { flex-direction: column; }
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ---- Page Containers ---- */
.users-page,
.transactions-page,
.invitations-page,
.import-page,
.owner-page,
.owner-dashboard,
.dashboard {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---- Cards ---- */
.card,
.add-form-wrapper,
.users-table-wrapper,
.table-wrapper,
.transactions-list,
.info-card,
.market-card,
.edit-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.add-form-wrapper { margin-bottom: 20px; }
.card { padding: 24px; margin-bottom: 20px; }

/* ---- Tables ---- */
.users-table,
.data-table,
.inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.users-table th,
.data-table th,
.inv-table th {
    background: var(--bg-header);
    padding: 12px 16px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.users-table td,
.data-table td,
.inv-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
}

.users-table tbody tr:hover,
.data-table tbody tr:hover,
.inv-table tbody tr:hover {
    background: var(--bg-hover);
}

.inactive-row { opacity: 0.5; }

/* ---- Sub Tables (Condo detail) ---- */
.sub-table { width: 100%; border-collapse: collapse; font-size: 0.825rem; }
.sub-table th { background: var(--bg-header); padding: 8px 12px; text-align: left; color: var(--text-secondary); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.4px; }
.sub-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-light); }
.sub-table tbody tr:hover { background: var(--bg-hover); }

/* ---- Badges ---- */
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    letter-spacing: 0.2px;
}

.role-super { background: var(--amber-bg); color: var(--amber-text); }
.role-owner { background: var(--green-bg); color: var(--green-text); }

.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.status-badge.active { background: var(--green-bg); color: var(--green-text); }
.status-badge.inactive { background: var(--red-bg); color: var(--red-text); }
.status-pending { background: var(--amber-bg); color: var(--amber-text); }
.status-accepted { background: var(--green-bg); color: var(--green-text); }
.status-revoked { background: var(--red-bg); color: var(--red-text); }
.status-expired { background: #f3f4f6; color: #6b7280; }

.type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
}
.type-income { background: var(--green-bg); color: var(--green-text); }
.type-expense { background: var(--red-bg); color: var(--red-text); }
.amount-income { color: var(--green); font-weight: 600; }
.amount-expense { color: var(--red); font-weight: 600; }

.count-badge {
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---- Buttons ---- */
.btn-save,
.btn-add,
.btn-invite {
    padding: 9px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    transition: all var(--transition);
    letter-spacing: -0.1px;
}

.btn-save:hover,
.btn-add:hover,
.btn-invite:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-save:disabled,
.btn-invite:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-cancel {
    padding: 9px 18px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    transition: all var(--transition);
}

.btn-cancel:hover { background: #f3f4f6; border-color: #d1d5db; }

.btn-delete {
    padding: 9px 18px;
    background: var(--red-bg);
    color: var(--red-text);
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    transition: all var(--transition);
    margin-left: auto;
}

.btn-delete:hover { background: var(--red); color: white; border-color: var(--red); }

.btn-wipe {
    padding: 9px 18px;
    background: var(--amber-bg);
    color: var(--amber-text);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font);
    transition: all var(--transition);
}
.btn-wipe:hover { background: #fcd34d; color: #78350f; }

.btn-action {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 4px;
    transition: all var(--transition);
}

.btn-action:hover { background: var(--primary-light); border-color: var(--primary-ring); }
.btn-danger:hover { background: var(--red-bg); border-color: #fca5a5; }

.btn-outline-secondary {
    padding: 8px 18px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--font);
    transition: all var(--transition);
}
.btn-outline-secondary:hover { background: var(--text); color: white; border-color: var(--text); }

.btn-edit {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    transition: all var(--transition);
}
.btn-edit:hover { background: var(--primary); color: white; }

.btn-logout {
    padding: 8px 18px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.btn-logout:hover { background: var(--text); color: white; }

/* ---- Form Elements ---- */
.edit-form { padding: 20px; }

.edit-fields,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

.edit-field label,
.form-field label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.edit-input,
.form-input,
.filter-select,
.filter-input,
.search-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-card);
    transition: all var(--transition);
}

.edit-input:focus,
.form-input:focus,
.filter-select:focus,
.filter-input:focus,
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.edit-input:disabled { background: #f9fafb; color: var(--text-muted); }

.edit-input-sm {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font);
    color: var(--text);
}
.edit-input-sm:focus { outline: none; border-color: var(--primary); }

.csv-textarea { min-height: 200px; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.825rem; resize: vertical; }

.edit-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 20px;
}

.edit-actions,
.form-actions { display: flex; gap: 8px; align-items: center; }

/* ---- Messages ---- */
.edit-message,
.form-message,
.msg {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 14px;
    font-weight: 500;
}

.edit-message.success,
.form-message.success,
.msg.success { background: var(--green-bg); color: var(--green-text); }
.edit-message.error,
.form-message.error,
.msg.error { background: var(--red-bg); color: var(--red-text); }

/* ---- Delete Confirm ---- */
.delete-confirm {
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
}
.delete-confirm-header { font-weight: 600; color: var(--red-text); margin-bottom: 8px; }
.delete-confirm p { font-size: 0.85rem; color: var(--text-secondary); }

/* ---- Edit Row ---- */
.edit-row td { background: #fafbfd; padding: 0 !important; }

/* ---- Filters ---- */
.filters,
.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }

.filter-select,
.filter-input {
    padding: 9px 12px;
    min-width: 140px;
}

/* ---- Search ---- */
.search-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.search-input { flex: 1; padding: 10px 14px; }

/* ---- Loading / Empty States ---- */
.loading,
.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
    font-size: 0.9rem;
}

.error,
.error-text {
    text-align: center;
    color: var(--red);
    padding: 48px;
}

/* ---- Dashboard ---- */
.dashboard .header,
.owner-dashboard .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.dashboard .header h1,
.owner-dashboard .header h1 {
    margin: 0;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-info {
    background: var(--bg-header);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    border: 1px solid var(--border-light);
}
.user-info p { margin: 5px 0; color: var(--text-secondary); }
.user-info strong { color: var(--text); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-card h3 {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -1px;
}

.stat-icon { font-size: 1.4rem; margin-bottom: 6px; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; letter-spacing: 0.3px; }
.stat-card.income .stat-value { color: var(--green); }
.stat-card.expense .stat-value { color: var(--red); }

/* ---- Summary Cards ---- */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.summary-card {
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    border: 1px solid var(--border-light);
}

.summary-label,
.sum-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.summary-value,
.sum-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: -0.5px;
}

.summary-card.income .summary-value,
.summary-card.income .sum-value { color: var(--green); }
.summary-card.expense .summary-value,
.summary-card.expense .sum-value { color: var(--red); }
.summary-card.net .summary-value { color: var(--blue); }
.summary-card.deposit .summary-value,
.summary-card.deposit .sum-value { color: var(--amber); }
.summary-card.cashout .summary-value,
.summary-card.cashout .sum-value { color: var(--primary); }
.summary-card.cash-balance { border: 2px solid var(--green); }
.summary-card.cash-balance .summary-value,
.summary-card.cash-balance .sum-value { color: var(--green); }

.summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* ---- Owner Dashboard ---- */
.section { margin-bottom: 28px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-header h2 { margin: 0; font-size: 1.1rem; color: var(--text); font-weight: 600; letter-spacing: -0.3px; }
.view-all { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.view-all:hover { text-decoration: underline; }

.tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
.tx-row:last-child { border-bottom: none; }
.tx-row:hover { background: var(--bg-hover); }

.tx-info { display: flex; align-items: center; gap: 12px; }
.tx-type { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 700; }
.tx-desc { font-weight: 500; color: var(--text); font-size: 0.875rem; }
.tx-prop,
.tx-meta,
.tx-date { color: var(--text-muted); font-size: 0.75rem; }
.tx-amount { font-weight: 600; font-size: 0.95rem; }

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.property-card {
    background: var(--bg-card);
    padding: 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    border: 1px solid var(--border-light);
}
.property-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.property-card h3 { margin: 0 0 5px; font-size: 1rem; color: var(--text); font-weight: 600; }
.prop-address { color: var(--text-muted); font-size: 0.8rem; margin: 0 0 8px; }
.prop-net { color: var(--primary); font-weight: 600; }

/* ---- Owner Properties List ---- */
.properties-list { display: flex; flex-direction: column; gap: 12px; }
.property-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
    border: 1px solid var(--border-light);
}
.property-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.prop-type { background: var(--primary-light); color: var(--primary); padding: 2px 10px; border-radius: 5px; font-size: 0.7rem; font-weight: 600; }
.prop-inactive { background: var(--red-bg); color: var(--red); padding: 2px 10px; border-radius: 5px; font-size: 0.7rem; font-weight: 600; margin-left: 6px; }
.fin-row { margin: 2px 0; font-size: 0.85rem; }
.fin-row.income { color: var(--green); }
.fin-row.expense { color: var(--red); }
.fin-row.net { font-weight: 600; color: var(--text); }

/* ---- Property Detail ---- */
.info-card { padding: 24px; margin-bottom: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.info-item { display: flex; flex-direction: column; }
.info-item .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.info-item span:last-child { font-weight: 500; color: var(--text); }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.mini-stat { background: var(--bg-card); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; border: 1px solid var(--border-light); }
.mini-stat .val { display: block; font-size: 1.4rem; font-weight: 700; color: var(--text); letter-spacing: -0.5px; }
.mini-stat.income .val { color: var(--green); }
.mini-stat.expense .val { color: var(--red); }
.mini-stat .lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.section-title { font-size: 1.1rem; color: var(--text); margin-bottom: 14px; font-weight: 600; }
.section-note { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

/* ---- Market Card ---- */
.market-card { padding: 24px; margin-bottom: 20px; }
.market-header h2 { margin: 0; font-size: 1.1rem; color: var(--text); font-weight: 600; }
.market-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.market-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.market-item { text-align: center; }
.market-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
.market-value { font-size: 1rem; font-weight: 600; color: var(--text); }
.market-range { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; }
.market-badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; margin-top: 6px; }
.market-badge.badge-above { background: var(--red-bg); color: var(--red-text); }
.market-badge.badge-below { background: var(--green-bg); color: var(--green-text); }
.market-badge.badge-at { background: var(--blue-bg); color: var(--blue-text); }
.appreciation.positive { color: var(--green); }
.appreciation.negative { color: var(--red); }
.edit-card { padding: 24px; margin-bottom: 20px; border-left: 3px solid var(--primary); }
.edit-card h3 { margin: 0 0 16px; font-size: 1rem; color: var(--text); font-weight: 600; }
.edit-row-btn { margin-top: 16px; text-align: right; }

/* ---- Import ---- */
.import-page h1 { color: var(--text); font-size: 1.5rem; margin-bottom: 20px; font-weight: 700; letter-spacing: -0.5px; }
.hint { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 14px; }
.stats-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { background: var(--primary-light); padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; color: var(--primary); font-weight: 600; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.result-item { text-align: center; background: var(--bg-header); border-radius: var(--radius); padding: 20px; }
.result-num { display: block; font-size: 2rem; font-weight: 700; color: var(--primary); letter-spacing: -1px; }
.result-label { display: block; font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ---- Condo Search ---- */
.condo-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    font-size: 0.875rem;
}
.condo-selected span { flex: 1; color: var(--text); }
.btn-clear { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1rem; padding: 0 4px; }
.btn-clear:hover { color: var(--red); }
.condo-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}
.condo-option { padding: 10px 14px; cursor: pointer; font-size: 0.85rem; transition: background var(--transition); }
.condo-option:hover { background: var(--bg-hover); }
.condo-city { color: var(--text-muted); font-size: 0.8rem; margin-left: 6px; }

/* ---- Invite Link ---- */
.invite-link-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--bg-header);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    flex-wrap: wrap;
    border: 1px solid var(--border-light);
}
.invite-link-box code { background: #e2e5ef; padding: 4px 8px; border-radius: 4px; word-break: break-all; font-size: 0.8rem; }
.btn-copy { padding: 4px 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px; cursor: pointer; font-size: 0.8rem; font-family: var(--font); }
.btn-copy:hover { background: var(--bg-hover); }

/* ---- Modal ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-box { background: var(--bg-card); border-radius: var(--radius); padding: 28px; max-width: 420px; width: 90%; box-shadow: var(--shadow-lg); }

/* ---- Back Link ---- */
.back-link { color: var(--primary); text-decoration: none; font-size: 0.85rem; font-weight: 500; }
.back-link:hover { text-decoration: underline; }

/* ---- Section Divider ---- */
.section-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0 16px; }

/* ---- Owner Filters ---- */
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.3px; }
.filter-group input { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.875rem; font-family: var(--font); }

/* ---- Detail Row (Condo) ---- */
.detail-row td { background: #fafbfd; padding: 0 !important; }
.detail-panel { padding: 20px; }
.detail-meta { display: flex; gap: 24px; margin-bottom: 14px; font-size: 0.85rem; color: var(--text-secondary); flex-wrap: wrap; }
.detail-loading { padding: 20px; text-align: center; color: var(--text-muted); }
.clickable-row { cursor: pointer; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .users-page,
    .transactions-page,
    .invitations-page,
    .import-page,
    .owner-page,
    .owner-dashboard,
    .dashboard { padding: 16px; }

    .summary-cards,
    .summary-row,
    .market-row,
    .stats-row { grid-template-columns: 1fr; }

    .edit-fields,
    .form-grid { grid-template-columns: 1fr; }

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

@media (min-width: 600px) {
    .owner-dashboard .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Lucide icons */
.icon { width: 1.125rem; height: 1.125rem; stroke-width: 1.75; vertical-align: -0.2em; }
.icon-sm { width: 0.95rem; height: 0.95rem; stroke-width: 1.9; vertical-align: -0.15em; }
.icon-lg { width: 1.75rem; height: 1.75rem; stroke-width: 1.6; vertical-align: -0.2em; }
h1 .icon, h2 .icon, h3 .icon { width: 1.15em; height: 1.15em; stroke-width: 1.75; vertical-align: -0.2em; margin-right: 6px; }
.stat-icon .icon { width: 2rem; height: 2rem; stroke-width: 1.5; vertical-align: middle; }
.btn-action .icon, .btn-add .icon, .btn-save .icon, .btn-delete .icon, .btn-edit .icon, .btn-cancel .icon, .btn-clear .icon { width: 1rem; height: 1rem; vertical-align: -0.2em; }

