:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --brand: #0f2b46;
    --brand-2: #2563eb;
    --line: #dbe4f0;
    --soft: #eef4ff;
    --danger: #b91c1c;
    --success: #047857;
    --shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: linear-gradient(135deg, #eef4ff, #f8fafc);
    color: var(--ink);
    max-width: 100%;
    overflow-x: hidden;
}
a { color: var(--brand-2); text-decoration: none; }
img { max-width: 100%; }

.site-container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; }
.site-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.site-brand b, .site-brand small { display: block; }
.site-brand small { color: var(--muted); font-size: 12px; }
.site-menu { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-menu a:not(.btn) { color: #334155; font-weight: 700; }
.hero-section { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; }
.hero-copy h1, .page-hero h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.04; margin: 12px 0 18px; letter-spacing: -.04em; }
.hero-copy p, .page-hero p, .section-heading p { color: var(--muted); font-size: 18px; line-height: 1.7; }
.eyebrow { display: inline-block; color: var(--brand-2); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-panel { display: grid; gap: 16px; padding: 24px; border-radius: 30px; background: linear-gradient(135deg, var(--brand), #173d63); box-shadow: var(--shadow); }
.mini-card { padding: 20px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 20px; color: #fff; }
.mini-card span, .mini-card b { display: block; }
.mini-card span { color: #c9d9ec; }
.mini-card b { font-size: 24px; margin-top: 4px; }
.site-section { padding: 54px 0; }
.alt-section { background: rgba(255,255,255,.55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { text-align: center; max-width: 820px; }
.section-heading h2, .cta-box h2 { font-size: clamp(28px, 3vw, 42px); margin: 10px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature-card, .price-card, .text-card, .cta-box {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
}
.feature-card h3, .price-card h3, .text-card h2 { margin-top: 0; }
.feature-card p, .price-card p, .text-card p, .cta-box p, .site-footer p { color: var(--muted); line-height: 1.65; }
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-hero { padding: 66px 0 32px; background: linear-gradient(135deg, #f8fbff, #eef4ff); }
.pricing-grid, .contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price { font-size: 36px; color: var(--brand); font-weight: 900; margin: 12px 0; }
.highlighted { border-color: #93c5fd; transform: translateY(-6px); }
.site-footer { background: var(--brand); color: #fff; padding: 36px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 20px; }
.site-footer a { display: block; color: #dbeafe; margin: 8px 0; }
.site-footer p { color: #c9d9ec; }

.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 480px; background: #fff; padding: 32px; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-card.wider { max-width: 760px; }
.auth-card h1 { text-align: center; margin: 0 0 8px; }
.auth-card p { text-align: center; color: var(--muted); }
.auth-logo, .brand-badge { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: #fff; font-weight: 900; margin: 0 auto 12px; }
.brand-badge { margin: 0; }
.layout { display: flex; min-height: 100vh; width: 100%; }
.sidebar { width: 285px; background: var(--brand); color: #fff; padding: 22px 16px; position: fixed; left: 0; top: 0; bottom: 0; overflow: auto; z-index: 40; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand .brand-badge { background: #fff; color: var(--brand); }
.brand b, .brand small { display: block; color: #fff; }
.brand small { color: #c9d9ec; }
.nav a { display: block; color: #edf5ff; padding: 13px 16px; border-radius: 14px; margin: 6px 0; font-size: 16px; }
.nav a:hover, .nav a.active { background: rgba(255, 255, 255, .13); }
.main { margin-left: 285px; width: calc(100% - 285px); min-height: 100vh; padding: 24px; }
.topbar { background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 24px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: 0 8px 26px rgba(15, 23, 42, .05); margin-bottom: 22px; }
.back-btn, .menu-btn { background: #eef2ff; color: #1e3a8a; border: 1px solid #c7d2fe; padding: 10px 16px; border-radius: 13px; cursor: pointer; font-weight: 800; }
.menu-btn { display: none; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; margin-bottom: 22px; }
.card h2, .card h3 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stat { padding: 22px; border-radius: 22px; background: linear-gradient(135deg, #fff, #f8fbff); border: 1px solid var(--line); }
.stat b { font-size: 30px; display: block; margin-top: 6px; }
.actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.btn, button.btn { display: inline-block; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; border-radius: 13px; padding: 11px 16px; font-weight: 800; cursor: pointer; font-size: 15px; }
.btn.secondary { background: #f1f5f9; color: #0f172a; border: 1px solid var(--line); }
.btn.danger { background: #dc2626; }
.field { margin-bottom: 15px; }
.field label { font-weight: 800; display: block; margin-bottom: 7px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 14px; background: #fff; font-size: 15px; min-height: 48px; }
.field textarea { min-height: 92px; resize: vertical; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: #fff; min-width: 720px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #334155; font-weight: 800; }
.pill { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 800; }
.notice, .danger-msg, .success-msg { padding: 13px 15px; border-radius: 14px; border: 1px solid #bfdbfe; background: #eef6ff; margin-bottom: 16px; }
.danger-msg { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.success-msg { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.gallery img { width: 100%; height: 100px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.file-list a { display: block; background: #f8fafc; border: 1px solid var(--line); padding: 10px; border-radius: 12px; margin-bottom: 8px; }
.tenant-photo-cell { width: 95px; min-width: 95px; }
.tenant-photo { width: 75px; height: 75px; object-fit: cover; border-radius: 10px; border: 1px solid #dbe3f0; background: #f5f7fb; display: block; }
.tenant-photo.placeholder { font-size: 11px; color: #64748b; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px; }
.expired-blink, .yellow-blink, .orange-blink { display: inline-block; padding: 6px 10px; border-radius: 999px; font-weight: 900; animation: blink 1s infinite; }
.expired-blink { background: #8b0000; color: #fff; }
.yellow-blink { background: #fde047; color: #000; }
.orange-blink { background: #f97316; color: #000; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (max-width: 950px) {
    .site-nav, .site-menu, .hero-grid, .cta-box, .footer-grid, .contact-grid { display: block; }
    .site-menu { margin-top: 14px; }
    .site-menu a { margin: 8px 8px 8px 0; display: inline-block; }
    .feature-grid, .pricing-grid { grid-template-columns: 1fr; }
    .layout { display: block; }
    .sidebar { position: relative; width: 100%; height: auto; bottom: auto; padding: 16px; }
    .nav { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
    .nav a { display: inline-block; margin: 0; white-space: nowrap; }
    .main { margin-left: 0; width: 100%; padding: 14px; }
    .grid, .grid-2 { grid-template-columns: 1fr; }
    .topbar { border-radius: 18px; }
    .card { padding: 18px; border-radius: 20px; }
    .menu-btn { display: inline-block; }
}
@media (max-width: 560px) {
    .auth-page { padding: 12px; }
    .auth-card { padding: 20px; border-radius: 18px; }
    .hero-section { padding: 42px 0; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .field input, .field select, .field textarea { font-size: 16px; }
    .btn, button.btn { width: 100%; text-align: center; margin: 3px 0; }
    .actions { display: block; }
    .stat b { font-size: 24px; }
    .card { padding: 14px; margin-bottom: 14px; }
    .main { padding: 10px; }
    .nav a { font-size: 14px; padding: 9px 10px; }
    table { min-width: 680px; }
    th, td { padding: 10px 9px; font-size: 13px; }
    .tenant-photo-cell { width: 80px; min-width: 80px; }
    .tenant-photo { width: 64px; height: 64px; }
}
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main { margin: 0; width: 100%; padding: 0; }
    .card { box-shadow: none; border: 0; }
}
