:root {
    --brand: #D40011;
    --brand-dark: #800000;
    --brand-light: #FBE9EB;
    --bs-primary: #D40011;
    --bs-primary-rgb: 212, 0, 17;
    --bs-link-color: #D40011;
    --bs-link-hover-color: #800000;
}
body { background: #f9fafb; color: #111827; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: .875rem; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 256px; background: #fff; border-right: 1px solid #e5e7eb; flex-shrink: 0; }
.sidebar .offcanvas-body { overflow-y: auto; }
.sidebar-brand { height: 64px; display: flex; align-items: center; padding: 0 24px; border-bottom: 1px solid #f3f4f6; }
.sidebar-brand img { height: 32px; width: auto; }
.side-nav { padding: 20px 12px; overflow-y: auto; }
.side-heading { padding: 16px 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #9ca3af; margin: 0; }
.side-heading:first-child { padding-top: 0; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 2px; border-radius: 8px; color: #4b5563; font-size: .875rem; font-weight: 500; transition: background .15s, color .15s; }
.side-link:hover { background: #f3f4f6; color: #111827; }
.side-link.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.side-icon { display: inline-flex; width: 18px; height: 18px; flex-shrink: 0; }
.nav-icon { width: 18px; height: 18px; }
.sidebar-user { display: flex; align-items: center; gap: 12px; border-top: 1px solid #f3f4f6; padding: 16px; }
.user-meta { min-width: 0; flex: 1; line-height: 1.3; }
.user-name, .user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-name { font-size: .82rem; font-weight: 500; color: #111827; }
.user-email { font-size: .72rem; color: #6b7280; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 600; flex-shrink: 0; }
.avatar-dark { background: #000; color: #fff; }
.btn-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #9ca3af; }
.btn-icon:hover { background: var(--brand-light); color: var(--brand); }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 1rem; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.topbar-title { font-size: 1.05rem; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; padding: 4px 12px; font-size: .72rem; font-weight: 600; }
.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 40px; }
.card { border: 1px solid #e5e7eb; border-radius: 1rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); background: #fff; }
.card-header { background: #fff; border-bottom: 1px solid #f3f4f6; font-weight: 600; padding: .9rem 1.1rem; border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
.card-body { padding: 1.1rem; }
.stat-card { padding: 1rem 1.1rem; }
.stat-card .label { color: #6b7280; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat-card .value { font-size: 1.55rem; font-weight: 700; line-height: 1.2; }
.table > :not(caption) > * > * { padding: .65rem .55rem; }
.table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; border-bottom-width: 1px; background: #fff; }
.table-hover > tbody > tr:hover > * { background: #f9fafb; }
.badge-soft { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.badge-soft.green { background: #dcfce7; color: #166534; }
.badge-soft.red { background: #fee2e2; color: #991b1b; }
.badge-soft.amber { background: #fef3c7; color: #92400e; }
.badge-soft.gray { background: #f3f4f6; color: #374151; }
.btn { border-radius: 8px; font-size: .84rem; font-weight: 500; }
.btn-sm { border-radius: 7px; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-focus-shadow-rgb: 212,0,17; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-border-color: var(--brand-dark); }
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
.form-label { font-size: .8rem; font-weight: 500; color: #374151; margin-bottom: .35rem; }
.form-control, .form-select { border-color: #e5e7eb; border-radius: 8px; font-size: .86rem; padding: .55rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(212,0,17,.12); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(212,0,17,.12); }
.page-link { color: var(--brand); }
.page-link:hover { color: var(--brand-dark); }
.active > .page-link, .page-link.active { background-color: var(--brand); border-color: var(--brand); }
.progress-bar { background-color: var(--brand); }
.alert { border-radius: 12px; }
.property-card { overflow: hidden; height: 100%; }
.property-card .cover { height: 158px; background: #e5e7eb center/cover no-repeat; position: relative; }
.property-card .cover .badge { position: absolute; top: .65rem; left: .65rem; }
.property-card .price { font-size: 1.02rem; font-weight: 700; color: var(--brand); }
.timeline { position: relative; padding-left: 1.2rem; }
.timeline:before { content: ''; position: absolute; left: .32rem; top: 0; bottom: 0; width: 2px; background: #e5e7eb; }
.timeline-item { position: relative; padding-bottom: 1rem; }
.timeline-item:before { content: ''; position: absolute; left: -1.07rem; top: .35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.thumb { width: 74px; height: 56px; object-fit: cover; border-radius: .45rem; background: #e5e7eb; }
.hint { font-size: .76rem; color: #6b7280; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.auth-body { background: #f9fafb; color: #111827; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 3rem 1rem; }
.auth-shell { width: 100%; max-width: 26rem; }
.auth-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 1rem; padding: 2rem; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.auth-logo { height: 36px; width: auto; }
.auth-title { font-size: 1.22rem; font-weight: 600; color: #111827; margin: 1.5rem 0 .35rem; }
.auth-sub { font-size: .85rem; color: #6b7280; margin: 0; }
.auth-foot { text-align: center; color: #9ca3af; font-size: .72rem; margin-top: 2rem; }
.display-5 { font-weight: 700; color: var(--brand); }
@media (min-width: 640px) { .auth-card { padding: 2.5rem; } }
@media (max-width: 991.98px) { .content { padding: 24px 20px; } }
@media (max-width: 575.98px) { .content { padding: 20px 14px 40px; } .topbar { padding: 0 16px; } }
