/* Shared Trashbuddy theme. Page-specific rules preserve existing app controls. */
:root {
  --green-dark: #064e3b;
  --green-light: #dcfce7;
  --green-accent: #86efac;
  --white: #ffffff;
  --primary: var(--green-dark);
  --primary-hover: #033c2d;
  --primary-light: var(--green-light);
  --text-main: #123d2b;
  --text-muted: #526b5e;
  --bg-color: #f0fdf4;
  --surface-color: var(--white);
  --border-color: #cee8d7;
  --error-color: #b43c37;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text-main); background: var(--bg-color); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 3px solid #15803d; outline-offset: 4px; }
button { cursor: pointer; }
.site-header { min-height: 84px; padding: 18px max(32px, calc((100vw - 1260px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border-color); background: #064e3b; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; font-size: 25px; letter-spacing: -1.1px; font-weight: 750; flex-shrink: 0; }
.brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; }
.brand-dot { color: #86efac; }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: 13px; font-weight: 550; }
.site-nav a { text-decoration: none; color: #dcfce7; padding: 11px 0; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--white); }
.site-nav a[aria-current] { box-shadow: 0 2px var(--green-accent); }
.site-nav a:last-child { border: 1px solid var(--green-accent); padding: 10px 17px; border-radius: 8px; color: var(--green-dark); background: var(--green-light); }
.site-nav a:last-child:hover { color: var(--green-dark); background: var(--green-accent); }
.site-nav a:last-child[aria-current] { color: var(--green-dark); }
.site-header :focus-visible { outline-color: var(--green-accent); }
.site-nav a span { margin-left: 12px; }
.eyebrow { display: block; color: #287347; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; line-height: 1.6; }
.little-dot { display: inline-block; width: 7px; height: 7px; background: #16a34a; border-radius: 50%; flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 20px; border: 1px solid transparent; border-radius: 8px; min-height: 44px; padding: 12px 20px; text-decoration: none; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .18s, box-shadow .18s; }
.btn-primary, .btn-success { background: var(--primary); color: #fff; box-shadow: none; }
.btn-primary:hover:not(:disabled), .btn-success:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 4px 12px #193a3015; transform: none; }
.btn-secondary { background: #fff; color: var(--text-main); border: 1px solid #c6e3d0; }
.btn-secondary:hover { background: #dcfce7; }
.btn-danger { background: #fff1ef; color: #a73530; border-color: #f0d6d1; }
.btn-warning { background: #faf3e3; color: #8d6217; border-color: #eddfbd; }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input:not([type="checkbox"]), select, textarea { border: 1px solid #c6e3d0; background: #ffffff; color: var(--text-main); border-radius: 8px; padding: 12px 13px; max-width: 100%; }
input::placeholder, textarea::placeholder { color: #617b6b; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #15803d; box-shadow: 0 0 0 3px #dcfce7; }
input[type="checkbox"] { accent-color: var(--primary); }
label { color: #27543b; font-size: 12px; font-weight: 550; }
.muted, .sub { color: var(--text-muted); }
.heading-dot { color: #16a34a; }
/* Homepage */
.index-page { background: var(--white); }
.home-hero { max-width: 1260px; margin: auto; padding: 78px 0 74px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; }
.hero-copy h1 { font-size: clamp(42px, 4.4vw, 66px); line-height: 1.12; letter-spacing: -3px; font-weight: 650; margin: 0 0 24px; }
.hero-copy h1 em, .signup-story h2 em { font-family: Georgia, serif; color: #15803d; font-weight: 400; }
.hero-copy > p { max-width: 430px; color: var(--text-muted); font-size: 16px; line-height: 1.85; margin: 0 0 28px; }
.hero-actions { display: flex; align-items: center; gap: 26px; }
.hero-actions .btn { min-height: 49px; }
.text-link { text-decoration: none; font-size: 13px; font-weight: 550; }
.text-link span { margin-left: 10px; }
.text-link:hover { text-decoration: underline; }
.hero-note { display: flex; gap: 9px; align-items: center; color: #526b5e; font-size: 11px; margin-top: 26px; }
.hero-note .little-dot { width: 5px; height: 5px; }
.city-preview { background: #dcfce7; border: 1px solid #b7e6c7; border-radius: 28px; position: relative; padding: 25px 18px 38px; transform: rotate(1deg); }
.preview-label { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; color: #166534; font-size: 11px; }
.neighbourhood { display: block; width: 100%; height: auto; margin: 8px 0 -17px; border-radius: 12px; }
.arrival-card { position: absolute; bottom: 72px; left: -24px; right: 24px; border: 1px solid #b7e6c7; border-radius: 12px; background: #ffffff; padding: 18px; display: flex; gap: 13px; align-items: center; box-shadow: 0 12px 35px #2b4b2b0d; transform: rotate(-1deg); }
.arrival-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #166534; background: #dcfce7; font-size: 25px; border-radius: 10px; }
.arrival-card strong { font-size: 13px; }
.arrival-card p { font-size: 10px; color: #526b5e; margin: 6px 0 0; }
.arrival-check { margin-left: auto; color: #15803d; }
.preview-caption { display: block; text-align: center; font-size: 9px; color: #366b4b; margin-top: 15px; }
.how-section { border-top: 1px solid var(--border-color); max-width: 1260px; margin: 0 auto; padding: 44px 0 58px; }
.section-intro { text-align: center; margin-bottom: 30px; }
.section-intro h2 { font-size: 29px; letter-spacing: -1px; font-weight: 600; margin: 10px 0; }
.section-intro p { color: var(--text-muted); font-size: 13px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.feature-grid article { padding: 23px 26px; border-left: 1px solid #b7e6c7; }
.feature-number { font-size: 10px; letter-spacing: 1.5px; color: #287347; }
.feature-grid h3 { font-size: 15px; font-weight: 600; margin: 17px 0 10px; }
.feature-grid p { font-size: 12px; line-height: 1.9; color: var(--text-muted); margin: 0; }
.site-footer { background: var(--green-dark); color: var(--white); border-top: 1px solid var(--border-color); padding: 25px max(32px, calc((100vw - 1260px) / 2)); display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; gap: 18px; }
.footer-note { margin-left: 12px; color: #bbf7d0; font-size: 10px; font-weight: 400; }
.site-footer a { font-size: 10px; color: #dcfce7; text-decoration: none; }
/* Beta onboarding */
.signin-page .main-container { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 90px; max-width: 1130px; width: 100%; margin: auto; padding: 54px 35px; }
.signup-story { padding: 25px 0; }
.signup-story h2 { margin: 24px 0; font-size: clamp(35px, 3.9vw, 54px); font-weight: 600; line-height: 1.2; letter-spacing: -2px; }
.signup-story > p { color: var(--text-muted); font-size: 15px; line-height: 1.8; max-width: 370px; }
.signup-benefits { display: grid; gap: 23px; margin-top: 35px; }
.signup-benefits > div { display: flex; gap: 17px; }
.signup-benefits > div > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #a7dcb9; border-radius: 50%; font-size: 10px; color: #287347; }
.signup-benefits strong { font-size: 13px; font-weight: 600; }
.signup-benefits p { color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.story-footer { font-family: Georgia, serif; font-style: italic; font-size: 15px; color: #287347; border-top: 1px solid #b7e6c7; padding-top: 25px; margin-top: 35px; }
.signin-page .card { width: 100%; padding: 35px; border: 1px solid #cee8d7; border-radius: 16px; box-shadow: 0 10px 35px #233e2906; }
.signin-page h1 { font-size: 27px; letter-spacing: -.8px; margin: 9px 0 12px; }
.signin-page .sub { font-size: 13px; line-height: 1.75; }
.signin-page .btn { width: 100%; }
.signin-page .actions-stack .btn { margin-top: 0; }
.signin-page .step-indicator { gap: 5px; margin-bottom: 25px; }
.signin-page .step { height: 3px; }
.signin-page a.back { font-size: 11px; margin-bottom: 24px; }
/* Administration */
.workspace-banner { padding: 14px max(32px, calc((100vw - 1200px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #dcfce7; color: #166534; font-size: 9px; letter-spacing: 1.5px; }
.workspace-banner a { font-size: 11px; letter-spacing: 0; text-decoration: none; }
.admin-page .wrap { max-width: 1264px; padding: 38px 32px 60px; }
.admin-page h1 { font-size: 30px; letter-spacing: -1px; margin: 7px 0 8px; font-weight: 650; }
.admin-page .topbar { margin-bottom: 30px; }
.admin-page .topbar .sub { margin: 0; }
.admin-page .card, .admin-page .modal-inner { background: #fff; border: 1px solid var(--border-color); box-shadow: 0 3px 10px #253d3203; border-radius: 12px; padding: 25px; }
.admin-page .card h2 { color: var(--text-main); font-size: 18px; letter-spacing: -.3px; text-transform: none; margin: 9px 0; }
.card-description { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 23px; }
.admin-page .login-box { max-width: 455px; margin: 5vh auto 0; }
.admin-page .login-box .card { padding: 32px; }
.login-emblem { width: 45px; height: 45px; background: #dcfce7; color: #166534; border-radius: 12px; font-size: 26px; display: grid; place-items: center; margin-bottom: 22px; }
.admin-page .login-box .sub { line-height: 1.8; }
.overview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 26px; }
.overview-stats > div { background: #dcfce7; border: 1px solid #b7e6c7; border-radius: 10px; padding: 22px; display: flex; flex-direction: column; }
.overview-stats > div:first-child { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.overview-stats > div:first-child span, .overview-stats > div:first-child small { color: var(--green-light); }
.overview-stats span { font-size: 11px; color: #166534; }
.overview-stats strong { font-size: 34px; line-height: 1.2; font-weight: 550; letter-spacing: -1px; margin: 12px 0 8px; }
.overview-stats small { font-size: 10px; color: #366b4b; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.admin-grid .card { margin: 0; min-width: 0; }
.residents-card { grid-column: 1 / -1; }
.settings-card .row { grid-template-columns: 1fr; gap: 12px; }
.settings-card .switch-row { margin-top: 0 !important; border-bottom: 1px solid #dcfce7; padding: 13px 2px; font-size: 12px; }
.admin-page .item { background: #ffffff; border: 1px solid #cee8d7; padding: 18px; margin-bottom: 12px; }
.admin-page .item-title { font-size: 14px; font-weight: 600; }
.admin-page .muted { line-height: 1.6; overflow-wrap: anywhere; }
.admin-page .rider-pill { background: #f0fdf4; border-color: #cee8d7; border-radius: 8px; display: flex; justify-content: space-between; padding: 10px 12px; font-size: 12px; margin: 0 0 8px; gap: 12px; overflow-wrap: anywhere; }
.admin-page .rider-pill .btn { flex-shrink: 0; }
.chip.on { color: #166534; background: #dcfce7; }
.chip.off { color: #ab3b32; background: #faeeea; }
.admin-page .toast { color: #fff; background: #064e3b; border-color: #15803d; max-width: calc(100vw - 32px); text-align: center; }
.admin-page .modal { background: #172b2266; backdrop-filter: blur(5px); }
.admin-page .modal-inner { padding: 28px; }
.admin-page .logs-list { background: #052e20; }
.admin-page .logs-meta { color: #526b5e; }
/* Live map workspace */
.dashboard-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg-color); color: var(--text-main); }
.dashboard-page .site-header { flex-shrink: 0; min-height: 74px; padding-top: 13px; padding-bottom: 13px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; padding: 25px 32px; gap: 20px; }
.dashboard-heading h1 { font-size: 26px; font-weight: 600; letter-spacing: -.8px; margin-top: 6px; }
.dashboard-heading > p { font-size: 12px; color: #526b5e; }
.dashboard-page .layout { flex: 1; height: auto; min-height: 0; margin: 0 24px 24px; gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; }
.dashboard-page .map-wrap { overflow: hidden; border: 1px solid #cee8d7; border-radius: 14px; background: #dcfce7; }
.dashboard-page .card { background: #fffffff5; border: 1px solid #cee8d7; box-shadow: 0 3px 12px #29402810; border-radius: 9px; }
.dashboard-page .title { color: #123d2b; font-size: 14px; }
.dashboard-page .subtitle { color: #526b5e; font-size: 10px; margin-top: 5px; }
.dashboard-page .badge { font-size: 10px; min-height: 36px; padding: 9px 12px; background: #fff; letter-spacing: .4px; }
.dashboard-page .badge.active { color: #166534; border-color: #86efac; }
.dashboard-page .badge.stopped { color: #a54a3c; border-color: #e7cbc1; background: #fffaf4; }
.dashboard-page .ws-status { color: #526b5e; font-size: 10px; }
.dashboard-page .ws-status.online { color: #166534; }
.dashboard-page .sidebar { border: 1px solid #cee8d7; border-radius: 14px; background: #fff; }
.sidebar-heading { background: var(--green-dark); color: var(--white); padding: 22px 20px 18px; border-bottom: 1px solid #b7e6c7; }
.sidebar-heading .eyebrow { color: var(--green-accent); }
.sidebar-heading h2 { font-weight: 600; font-size: 17px; margin-top: 8px; letter-spacing: -.4px; }
.dashboard-page .section { border-color: #dcfce7; padding: 20px; }
.dashboard-page .section h2 { color: #287347; font-size: 10px; letter-spacing: 1.2px; margin-bottom: 14px; }
.dashboard-page .info-row { font-size: 11px; padding: 5px 0; }
.dashboard-page .info-row span:first-child, .dashboard-page .muted { color: #526b5e; }
.dashboard-page .muted { font-size: 11px; }
.dashboard-page .resident-item, .dashboard-page .alert-item { background: #f0fdf4; border: 1px solid #cee8d7; padding: 14px; border-radius: 8px; font-size: 12px; }
.dashboard-page .alert-item.success { border-left: 3px solid #16a34a; }
.dashboard-page .alert-item.skip { border-left: 3px solid #bd9346; }
.dashboard-page .empty { background: #f0fdf4; border: 1px dashed #b7e6c7; border-radius: 8px; color: #526b5e; font-size: 11px; padding: 23px 14px; line-height: 1.7; }
.dashboard-page .map-btn { background: #fff; color: #064e3b; border: 1px solid #b7e6c7; border-radius: 10px; right: 14px; bottom: 98px; box-shadow: 0 3px 10px #28442a12; }
.dashboard-page .leaflet-control-zoom { border: 1px solid #b7e6c7; border-radius: 8px; overflow: hidden; margin-right: 18px; margin-bottom: 23px; box-shadow: 0 3px 10px #28442a12; }
.dashboard-page .leaflet-control-zoom a { color: #064e3b; }
.dashboard-page .leaflet-popup-content-wrapper { color: #123d2b; border-radius: 10px; }
@media (min-width: 901px) and (max-width: 1150px) {
  .dashboard-page .top-bar { gap: 6px; }
  .dashboard-page .top-meta { margin-left: 0; }
}
@media (max-width: 1330px) {
  .home-hero, .how-section { margin-left: 40px; margin-right: 40px; }
  .home-hero { gap: 45px; }
}
@media (max-width: 900px) {
  .site-header { padding: 16px 22px; min-height: 74px; }
  .site-nav { gap: 18px; }
  .home-hero { padding: 48px 0; gap: 35px; }
  .hero-copy h1 { letter-spacing: -2px; font-size: 42px; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { gap: 14px; flex-wrap: wrap; }
  .hero-note { line-height: 1.7; }
  .arrival-card { left: -12px; right: 8px; padding: 12px; bottom: 55px; }
  .arrival-card strong { font-size: 11px; }
  .preview-label { font-size: 9px; }
  .feature-grid { gap: 14px; }
  .feature-grid article { padding: 18px; }
  .signin-page .main-container { gap: 35px; padding: 35px 25px; }
  .signin-page .card { padding: 26px; }
  .dashboard-heading { padding: 20px 22px; }
  .dashboard-heading > p { display: none; }
  .dashboard-page .layout { grid-template-columns: 1fr; grid-template-rows: minmax(120px, 1fr) auto; margin: 0 12px 12px; gap: 10px; }
  .dashboard-page { --sheet-expanded: min(44dvh, 410px); }
  .dashboard-page .sidebar { border-radius: 14px; box-shadow: none; }
  .dashboard-page .map-btn, .dashboard-page .layout.sheet-open .map-btn { bottom: 96px; }
  .dashboard-page .leaflet-control-zoom, .dashboard-page .layout.sheet-open .leaflet-control-zoom { margin-bottom: 22px !important; }
  .dashboard-page .sheet-handle-bar { background: #86efac; }
  .dashboard-page .tab-btn { background: #ffffff; border-color: #b7e6c7; color: #166534; }
  .dashboard-page .tab-btn.active { background: #dcfce7; color: #064e3b; border-color: #86efac; }
  .dashboard-page .ws-status .ws-label { display: inline; }
  .dashboard-page .top-bar { flex-wrap: wrap; }
  .dashboard-page .top-meta { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .site-header { padding: 14px 18px; gap: 12px; min-height: 70px; }
  .brand { font-size: 21px; gap: 6px; }
  .brand img { width: 29px; height: 29px; }
  .site-nav { gap: 13px; font-size: 10px; }
  .site-nav a:first-child { display: none; }
  .site-nav a:last-child { padding: 8px 10px; }
  .site-nav a:last-child:hover { color: var(--green-dark); background: var(--green-accent); }
.site-nav a:last-child[aria-current] { color: var(--green-dark); }
.site-header :focus-visible { outline-color: var(--green-accent); }
.site-nav a span { display: none; }
  .home-hero { grid-template-columns: 1fr; margin: 0 24px; padding: 38px 0; gap: 35px; }
  .hero-copy h1 { font-size: 45px; }
  .hero-copy .eyebrow { font-size: 9px; margin-bottom: 20px; }
  .hero-copy > p { max-width: 100%; }
  .hero-actions { gap: 23px; }
  .hero-actions .btn { width: auto; }
  .city-preview { margin: 0 8px; max-width: 440px; transform: none; }
  .arrival-card { transform: none; }
  .how-section { margin: 0 24px; padding: 34px 0; }
  .section-intro { text-align: left; }
  .section-intro h2 { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr; gap: 20px; }
  .feature-grid article { padding: 10px 20px; }
  .site-footer { padding: 24px; flex-wrap: wrap; }
  .footer-note { display: block; margin: 7px 0 0; }
  .signin-page .main-container { display: flex; flex-direction: column; gap: 24px; padding: 28px 20px; }
  .signup-story { padding: 0; width: 100%; }
  .signup-story h2 { font-size: 35px; margin: 10px 0; letter-spacing: -1.4px; }
  .signup-story h2 br { display: none; }
  .signup-story h2 em { display: block; }
  .signup-story > p { font-size: 13px; }
  .signup-benefits, .story-footer { display: none; }
  .signin-page .card { max-width: 460px; padding: 25px; }
  .signin-page h1 { font-size: 25px; }
  .workspace-banner { padding: 12px 20px; font-size: 8px; }
  .admin-page .wrap { padding: 25px 18px 40px; }
  .admin-page h1 { font-size: 26px; }
  .admin-page .topbar { gap: 18px; margin-bottom: 24px; }
  .overview-stats { gap: 8px; margin-bottom: 18px; }
  .overview-stats > div { padding: 14px 10px; }
  .overview-stats span { font-size: 9px; min-height: 25px; }
  .overview-stats strong { font-size: 23px; letter-spacing: -.5px; margin: 9px 0 0; }
  .overview-stats small { display: none; }
  .admin-grid { grid-template-columns: 1fr; gap: 18px; }
  .admin-page .card, .admin-page .modal-inner { padding: 20px; }
  .admin-page .login-box { margin-top: 20px; }
  .dashboard-page .site-header { min-height: 65px; padding: 13px 16px; }
  .dashboard-heading { padding: 14px 18px 16px; }
  .dashboard-heading h1 { font-size: 22px; }
  .dashboard-heading .eyebrow { font-size: 8px; }
  .dashboard-page .top-bar { top: 10px; left: 10px; right: 10px; gap: 6px; }
  .dashboard-page .top-bar .card:first-child { flex: 1 0 auto; }
  .dashboard-page .top-meta { gap: 5px; }
  .dashboard-page .ws-status { padding: 6px 9px; min-height: 30px; }
  .dashboard-page .badge { min-height: 30px; padding: 6px 9px; font-size: 9px; }
  .dashboard-page .title { font-size: 12px; }
  .dashboard-page .card { padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 375px) {
  .site-header, .dashboard-page .site-header { flex-wrap: wrap; gap: 9px; }
  .site-header .site-nav { width: 100%; justify-content: space-between; gap: 15px; }
  .site-nav a { white-space: nowrap; }
  .site-nav a:first-child { display: block; }
  .hero-copy h1 { font-size: 40px; }
}
