:root {
  --green-950: #04351d;
  --green-900: #064424;
  --green-800: #07562b;
  --green-700: #0b7138;
  --green-600: #159447;
  --green-100: #e6f4e9;
  --green-50: #f2f9f3;
  --paper: #fffdf8;
  --ink: #173027;
  --muted: #6b7a72;
  --line: #d7e3d9;
  --orange: #e99a34;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #f5f8f3; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button, select { font: inherit; }
.hidden { display: none !important; }

.owner-loading, .owner-denied { min-height: 100vh; padding: 30px; display: grid; place-content: center; justify-items: center; color: var(--green-900); text-align: center; }
.owner-loading img, .owner-denied img { object-fit: contain; }
.owner-loading strong { margin-top: 12px; }
.owner-denied h1 { margin: 15px 0 4px; font: 700 2rem Georgia, serif; }
.owner-denied p { color: var(--muted); }
.owner-denied a { padding: 11px 16px; border-radius: 999px; color: white; background: var(--green-700); font-weight: 750; text-decoration: none; }

.owner-app { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.owner-sidebar { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; color: white; background: var(--green-950); }
.owner-brand { padding: 4px 7px 20px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.owner-brand img { width: 56px; height: 38px; padding: 3px; border-radius: 10px; background: white; object-fit: contain; }
.owner-brand span, .owner-brand strong, .owner-brand small { display: block; }
.owner-brand strong { font: 700 1.3rem Georgia, serif; }
.owner-brand small { color: rgba(255,255,255,.62); font-size: .7rem; }
.owner-sidebar nav { display: grid; gap: 5px; }
.owner-sidebar nav a { min-height: 44px; padding: 10px 12px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; border-radius: 11px; color: rgba(255,255,255,.74); font-size: .82rem; font-weight: 720; text-decoration: none; }
.owner-sidebar nav a:hover, .owner-sidebar nav a.active { color: white; background: rgba(255,255,255,.11); }
.owner-sidebar nav b { min-width: 22px; padding: 2px 6px; border-radius: 999px; color: var(--green-950); background: #f3c36f; font-size: .68rem; text-align: center; }
.sidebar-links { margin-top: auto; padding-top: 20px; display: grid; gap: 6px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-links a { padding: 8px 12px; color: rgba(255,255,255,.62); font-size: .74rem; text-decoration: none; }
.sidebar-links a:hover { color: white; }

.owner-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 70px; }
.owner-header { margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.owner-header p, .section-heading p { margin: 0 0 4px; color: var(--green-700); font-size: .7rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.owner-header h1 { margin: 0; color: var(--green-950); font: 700 clamp(1.7rem, 3vw, 2.4rem)/1.1 Georgia, serif; }
.owner-status { padding: 8px 12px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--green-800); background: white; font-size: .75rem; font-weight: 750; }
.owner-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 4px rgba(21,148,71,.12); }

.owner-section { scroll-margin-top: 20px; margin-bottom: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 19px; background: white; box-shadow: 0 16px 45px rgba(6,61,33,.05); }
.section-heading { margin-bottom: 14px; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-heading h2 { margin: 0; color: var(--green-950); font: 700 1.55rem Georgia, serif; }
.section-heading time, .section-description { color: var(--muted); font-size: .75rem; }
.section-link { padding: 8px 12px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: .72rem; font-weight: 780; text-decoration: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { min-height: 125px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 16px; color: var(--green-950); background: var(--green-50); }
.stat-card.urgent { color: white; background: var(--green-800); }
.stat-card span { color: var(--muted); font-size: .72rem; font-weight: 730; }
.stat-card.urgent span { color: rgba(255,255,255,.7); }
.stat-card strong { font: 700 2.3rem/1 Georgia, serif; }
.stat-card small { font-size: .67rem; opacity: .76; }
.privacy-note { margin-top: 12px; padding: 12px 14px; border-left: 4px solid var(--green-600); border-radius: 10px; background: #f8fbf7; }
.privacy-note strong { color: var(--green-900); font-size: .76rem; }
.privacy-note p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }

.proposal-list, .activity-list, .team-list { display: grid; gap: 8px; }
.proposal-item, .team-item, .activity-item { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.proposal-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.proposal-icon, .activity-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--green-800); background: var(--green-100); font-weight: 850; }
.proposal-copy strong, .proposal-copy span { display: block; }
.proposal-copy strong { color: var(--green-950); font-size: .85rem; }
.proposal-copy span { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.proposal-item > a { padding: 8px 11px; border-radius: 10px; color: white; background: var(--green-700); font-size: .7rem; font-weight: 800; text-decoration: none; }
.empty-list { padding: 24px; border: 1px dashed #bfd2c2; border-radius: 14px; color: var(--muted); background: var(--green-50); text-align: center; font-size: .78rem; }

.team-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 15px; }
.team-copy strong, .team-copy span { display: block; }
.team-copy strong { color: var(--green-950); font-size: .84rem; }
.team-copy span { margin-top: 2px; color: var(--muted); font-size: .69rem; }
.role-control { display: flex; align-items: center; gap: 8px; }
.role-badge { padding: 5px 9px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: .67rem; font-weight: 850; }
.role-badge.owner { color: #784b09; background: #fff0d5; }
.role-control button { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--green-900); background: white; cursor: pointer; font-size: .68rem; font-weight: 780; }
.role-control button:hover { background: var(--green-100); }
.form-message { min-height: 1.2em; margin: 10px 0 0; color: var(--green-700); font-size: .72rem; font-weight: 750; }

.activity-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.activity-copy strong, .activity-copy span { display: block; }
.activity-copy strong { color: var(--green-950); font-size: .8rem; }
.activity-copy span { color: var(--muted); font-size: .68rem; }
.activity-item time { color: var(--muted); font-size: .66rem; white-space: nowrap; }

@media (max-width: 900px) {
  .owner-app { grid-template-columns: 76px minmax(0, 1fr); }
  .owner-sidebar { padding-inline: 9px; }
  .owner-brand { justify-content: center; padding-inline: 0; }
  .owner-brand span, .owner-sidebar nav a:not(.active) b, .owner-sidebar nav a { font-size: 0; }
  .owner-sidebar nav a { grid-template-columns: 1fr; justify-items: center; }
  .owner-sidebar nav a span { font-size: 1rem; }
  .owner-sidebar nav a b { position: absolute; margin: -25px 0 0 30px; font-size: .62rem; }
  .sidebar-links a { padding-inline: 3px; font-size: .6rem; text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .owner-app { display: block; }
  .owner-sidebar { position: sticky; z-index: 10; width: 100%; height: auto; padding: 7px; flex-direction: row; align-items: center; overflow-x: auto; }
  .owner-brand { padding: 0; }
  .owner-brand img { width: 47px; height: 32px; }
  .owner-sidebar nav { margin-left: 5px; display: flex; gap: 3px; }
  .owner-sidebar nav a { min-width: 42px; min-height: 38px; padding: 5px; }
  .owner-sidebar nav a b { margin: -20px 0 0 22px; }
  .sidebar-links { display: none; }
  .owner-main { width: calc(100% - 14px); padding-top: 14px; }
  .owner-header { align-items: flex-start; }
  .owner-status { display: none; }
  .owner-section { padding: 14px; border-radius: 15px; }
  .stats-grid { gap: 7px; }
  .stat-card { min-height: 105px; padding: 12px; }
  .stat-card strong { font-size: 1.9rem; }
  .proposal-item { grid-template-columns: auto 1fr; }
  .proposal-item > a { grid-column: 2; justify-self: start; }
  .team-item { grid-template-columns: 1fr; }
  .role-control { justify-content: space-between; }
  .activity-item { grid-template-columns: auto 1fr; }
  .activity-item time { grid-column: 2; }
}
