:root {
    --mint: #6ee7b7;
    --navy: #1e3a5f;
    --navy-dark: #13263f;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f8fafc;
    --card: #ffffff;
    --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --danger: #ef4444;
    --success: #10b981;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: radial-gradient(circle at 15% 10%, rgba(110, 231, 183, 0.12), transparent 45%),
        radial-gradient(circle at 85% 0%, rgba(30, 58, 95, 0.08), transparent 35%),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; width: 92%; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.site-header__inner--centered { justify-content: center; }
.site-header__logo img { height: 50px; }
.site-header__nav { display: flex; align-items: center; gap: 16px; }
.host-greeting { font-size: 14px; color: var(--muted); font-weight: 500; }

/* Footer */
main { flex: 1; }
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 48px; }
.site-footer__inner { padding: 20px 0; text-align: center; font-size: 13px; color: var(--muted); }

/* Section + Card */
.section { padding: 32px 0 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; }
.card + .card { margin-top: 20px; }
.card--narrow { max-width: 440px; margin-left: auto; margin-right: auto; }

/* Typography */
.section-title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.section-subtitle { font-size: 15px; color: var(--muted); margin: 0; }

/* Forms */
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); font-size: 15px; font-family: inherit; background: #fff; color: var(--text); width: 100%; }
.input:focus { border-color: var(--mint); outline: none; box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.25); }

/* Buttons */
.btn { padding: 12px 22px; border-radius: 999px; font-weight: 600; border: none; cursor: pointer; font-size: 14px; transition: all 0.2s ease; display: inline-block; text-align: center; text-decoration: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); text-decoration: none; }
.btn-outline { border: 1px solid var(--line); background: #fff; color: var(--text); }
.btn-outline:hover { border-color: var(--mint); color: var(--navy); text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-row { display: flex; gap: 12px; margin-top: 8px; }

/* Notices */
.notice { border-radius: var(--radius-md); padding: 14px 18px; font-size: 14px; margin-bottom: 16px; }
.notice--success { background: rgba(110, 231, 183, 0.12); border: 1px solid rgba(110, 231, 183, 0.35); color: #065f46; }
.notice--error { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.25); color: #991b1b; }
.notice--info { background: rgba(59, 130, 246, 0.08); border: 1px solid rgba(59, 130, 246, 0.25); color: #1e40af; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.stat-box strong { font-size: 28px; color: var(--navy); }
.stat-box span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Property list */
.prop-list { display: flex; flex-direction: column; gap: 8px; }
.prop-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #fff; border-radius: var(--radius-md); border: 1px solid var(--line); }
.prop-row:hover { border-color: var(--mint); }
.prop-info { flex: 1; min-width: 0; }
.prop-title { font-weight: 600; color: var(--text); font-size: 15px; overflow-wrap: break-word; }
.prop-meta { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: break-word; }
.prop-status { padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.prop-status.active { background: rgba(110, 231, 183, 0.2); color: #065f46; }
.prop-status.pending { background: rgba(251, 191, 36, 0.2); color: #92400e; }
.prop-status.imported { background: rgba(59, 130, 246, 0.15); color: #1e40af; }

/* Stripe status */
.stripe-status { display: flex; align-items: center; gap: 8px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); }
.stripe-dot { width: 10px; height: 10px; border-radius: 50%; }
.stripe-dot.ok { background: var(--success); }
.stripe-dot.partial { background: #f59e0b; }
.stripe-dot.none { background: var(--line); }
.stripe-label { font-size: 14px; font-weight: 500; }
.stripe-detail { font-size: 12px; color: var(--muted); }

/* Links */
.text-link { color: var(--navy); font-weight: 500; font-size: 14px; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* Account grid */
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.account-grid .card + .card { margin-top: 0; }
@media (max-width: 720px) { .account-grid { grid-template-columns: 1fr; } }

/* Hamburger — mobile only */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; padding: 7px; transition: border-color 0.2s; }
.hamburger:hover { border-color: var(--mint); }
.hamburger span { display: block; height: 2px; background: var(--navy); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Desktop nav — horizontal inline */
.sidebar { position: static; width: auto; height: auto; background: none; box-shadow: none; display: flex; flex-direction: row; align-items: center; gap: 0; }
.sidebar__head { display: none; }
.sidebar__menu { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: 4px; }
.sidebar__menu li a { display: inline-block; padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--text); border-radius: var(--radius-sm); transition: all 0.15s; }
.sidebar__menu li a:hover, .sidebar__menu li a.active { background: rgba(110, 231, 183, 0.15); color: var(--navy); text-decoration: none; }
.sidebar__menu li a.active { font-weight: 600; }
.sidebar__sep { display: none; }
.sidebar__logout { color: var(--danger) !important; }
.sidebar-overlay { display: none; }

/* Mobile/tablet — slide-out sidebar (matches admin + guest portal breakpoint) */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .sidebar { position: fixed; top: 0; right: -280px; width: 270px; height: 100vh; background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.1); z-index: 1000; transition: right 0.3s ease; flex-direction: column; align-items: stretch; padding: 0; }
    .sidebar.open { right: 0; }
    .sidebar__head { display: block; padding: 24px 20px; border-bottom: 1px solid var(--line); background: var(--navy); color: #fff; }
    .sidebar__name { font-size: 16px; font-weight: 700; }
    .sidebar__email { font-size: 13px; opacity: 0.7; margin-top: 2px; }
    .sidebar__menu { flex-direction: column; align-items: stretch; gap: 0; flex: 1; padding: 0; }
    .sidebar__menu li a { display: block; padding: 12px 20px; font-size: 15px; border-radius: 0; }
    .sidebar__menu li a.active { border-right: 3px solid var(--mint); }
    .sidebar__sep { display: block; border: none; height: 1px; background: var(--line); margin: 8px 0; }
    .sidebar-overlay.open { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.3); z-index: 999; cursor: pointer; }
}

/* Responsive */
@media (max-width: 720px) {
    .container { padding: 0 16px; }
    .card { padding: 20px; border-radius: var(--radius-md); }
    .section-title { font-size: 20px; }
    .btn { width: 100%; }
    .btn-row { flex-direction: column; }
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .site-header__logo img { height: 40px; }
}

@media (max-width: 768px) {
    .input, .select, .textarea { font-size: 16px; }
}

/* Input + button rows (e.g. iCal Copy / Add Feed). On desktop they sit side by
   side; on mobile they stack so the input stays full-width and usable instead
   of being crushed by the full-width button. */
.bd-stack-row { display: flex; gap: 8px; align-items: center; }
.bd-stack-row .input { flex: 1; min-width: 0; }
@media (max-width: 600px) {
    .bd-stack-row { flex-direction: column; align-items: stretch; }
}

/* Status filter tabs stay compact, wrapping chips — never full-width-stacked
   on mobile (overrides the global .btn width:100% mobile rule). */
.bd-filter-tabs .btn { width: auto; }

@media (max-width: 540px) {
    .container { padding: 0 12px; }
    .card { padding: 16px; }
    .input { font-size: 16px; }
}
