/* Charcoal and olive surfaces with lime accents, inspired by the supplied reference. */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f6e9;
  --green: #c1f477;
  --green2: #a9df5b;
  --cream: #0d110d;
  --soft: #20291b;
  --muted: #a6b2a1;
  --line: #303a2b;
  --shadow: 0 18px 38px rgba(0, 0, 0, .28);
  color: var(--ink);
  background: #080b08;
}
html[data-theme="dark"] body {
  background: radial-gradient(circle at 10% 0, #35471b, transparent 28%),
    radial-gradient(circle at 100% 100%, #172a12, transparent 38%), #080b08;
}
html[data-theme="dark"] .app-frame {
  background: radial-gradient(circle at 55% -2%, #293719 0, #171e13 23%, #0d110d 58%);
  box-shadow: 0 0 90px rgba(0, 0, 0, .42);
}
html[data-theme="dark"] .page,
html[data-theme="dark"] .admin-shell { color: var(--ink); }
html[data-theme="dark"] .field-success { color: #a8eb80; }
html[data-theme="dark"] .field-error { color: #ff8a80; }
html[data-theme="dark"] small,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .page-intro,
html[data-theme="dark"] .field-hint { color: var(--muted); }
html[data-theme="dark"] .icon-btn { background: #222a20; color: var(--ink); }
html[data-theme="dark"] .icon-btn.ghost { background: transparent; }
html[data-theme="dark"] .greeting small,
html[data-theme="dark"] .market-meta,
html[data-theme="dark"] .post-action,
html[data-theme="dark"] .opportunity-card p,
html[data-theme="dark"] .more-group-title,
html[data-theme="dark"] .more-row .row-tail { color: var(--muted); }

/* Home and shared cards */
html[data-theme="dark"] .feed-panel { background: #10150f; }
html[data-theme="dark"] .tabs { background: #1c241a; }
html[data-theme="dark"] .tab { color: var(--ink); }
html[data-theme="dark"] .tab.active,
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] .choice.active { background: var(--lime); color: #17220d; }
html[data-theme="dark"] .shortcut-icon,
html[data-theme="dark"] .round-arrow,
html[data-theme="dark"] .action-card .action-icon,
html[data-theme="dark"] .more-row .row-icon,
html[data-theme="dark"] .service-card .service-icon,
html[data-theme="dark"] .lesson-row .icon-btn {
  background: #2b3b21;
  color: var(--lime);
}
html[data-theme="dark"] .feed-card,
html[data-theme="dark"] .learn-card,
html[data-theme="dark"] .lesson-row,
html[data-theme="dark"] .opportunity-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .record-row,
html[data-theme="dark"] .question-row,
html[data-theme="dark"] .more-row,
html[data-theme="dark"] .more-profile,
html[data-theme="dark"] .market-card,
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .forecast-day,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .admin-frame .admin-section {
  background: #1a2018;
  border-color: #2b3528;
  color: var(--ink);
  box-shadow: 0 9px 24px rgba(0, 0, 0, .16);
}
html[data-theme="dark"] .feed-card { background: #191f18; }
html[data-theme="dark"] .post-actions,
html[data-theme="dark"] .detail-list div { border-color: var(--line); }
html[data-theme="dark"] .post-action.active { color: #ff6a83; }
html[data-theme="dark"] .post-action.saved,
html[data-theme="dark"] .market-price,
html[data-theme="dark"] .detail-price,
html[data-theme="dark"] .metric strong,
html[data-theme="dark"] .opportunity-card .label { color: var(--lime); }
html[data-theme="dark"] .market-layout-switch { background: #20291b; border-color: var(--line); }
html[data-theme="dark"] .market-layout-button.active { background: var(--lime); color: #17220d; }
html[data-theme="dark"] .chip,
html[data-theme="dark"] .quantity,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .service-card .actions a,
html[data-theme="dark"] .service-card .actions button,
html[data-theme="dark"] .weather-advice {
  background: #273222;
  color: #d9eccb;
}
html[data-theme="dark"] .status-pill.waiting { background: #3c311b; color: #f4d899; }
html[data-theme="dark"] .weather-day-detail{background:#1a2018;color:var(--ink)}
html[data-theme="dark"] .weather-day-heading p,html[data-theme="dark"] .weather-hour-row small,html[data-theme="dark"] .weather-select-hint,html[data-theme="dark"] .weather-hour-empty{color:#aebba9}
html[data-theme="dark"] .forecast-day.selected{border-color:var(--lime)}
html[data-theme="dark"] .bubble { background: #232d20; }
html[data-theme="dark"] .bubble.mine { background: #3e5a29; }
html[data-theme="dark"] .post-media-frame,
html[data-theme="dark"] .item-hero { background-color: #222a20; }

/* Navigation and actions */
html[data-theme="dark"] .bottom-nav {
  background: linear-gradient(135deg, rgba(34, 43, 31, .79), rgba(17, 24, 18, .84));
  border-color: rgba(218, 247, 205, .17);
  box-shadow: 0 -14px 36px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(17px) saturate(145%);
  backdrop-filter: blur(17px) saturate(145%);
}
html[data-theme="dark"] .bottom-nav::before {
  background: linear-gradient(110deg, rgba(220, 255, 192, .09), transparent 44%, rgba(255, 255, 255, .04));
}
html[data-theme="dark"] .nav-item { color: #b6c6b0; }
html[data-theme="dark"] .nav-item.active .nav-icon { color: #142410; }
html[data-theme="dark"] .nav-item.active span:last-child { color: var(--lime); }
html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .sell-banner,
html[data-theme="dark"] .feed-create,
html[data-theme="dark"] .fab { background: var(--lime); color: #17220d; }
html[data-theme="dark"] .primary-btn.lime { color: #17220d; }
html[data-theme="dark"] .profile-page .profile-actions .primary-btn { color: #173121; }
html[data-theme="dark"] .sell-banner .plus { background: #1d2a13; color: var(--lime); }
html[data-theme="dark"] .secondary-btn {
  background: #253020;
  border-color: #3b4934;
  color: var(--ink);
}
html[data-theme="dark"] .theme-switch { background: #3d4936; }
html[data-theme="dark"] .theme-row[aria-pressed="true"] .theme-switch { background: var(--lime); }
html[data-theme="dark"] .theme-switch span { background: #f5f8ec; }

/* Forms, dialogs and sign-in */
html[data-theme="dark"] .modal { background: #111810; }
html[data-theme="dark"] .modal-backdrop { background: rgba(0, 0, 0, .7); }
html[data-theme="dark"] .post-detail-screen{background:#111810}html[data-theme="dark"] .post-detail-card{background:#191f18}
html[data-theme="dark"] .official-label{background:#344722;color:var(--lime)}html[data-theme="dark"] .notification-count{box-shadow:0 0 0 2px #111810}
html[data-theme="dark"] .comments-sheet,html[data-theme="dark"] .comments-compose{background:#171d16;border-color:#354331}
html[data-theme="dark"] .comment-compose-form input{background:#252e23;border-color:#3b4936;color:var(--ink)}
html[data-theme="dark"] .comment-compose-form button{background:var(--lime);color:#17220d}
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .search-input,
html[data-theme="dark"] .chat-compose input,
html[data-theme="dark"] .choice,
html[data-theme="dark"] .admin-frame select {
  background: #222b1f;
  border-color: #3c4836;
  color: var(--ink);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #9aa995; }
html[data-theme="dark"] .upload-box { background: #202b1b; border-color: #506445; color: var(--lime); }
html[data-theme="dark"] .choice.active { border-color: var(--lime); }
html[data-theme="dark"] .toast { background: #d4ff50; color: #17220d; }
html[data-theme="dark"] .auth-shell {
  background: radial-gradient(circle at 84% 6%, #344c20, transparent 35%),
    linear-gradient(#151d11, #0b100c);
}
html[data-theme="dark"] .auth-shell p { color: var(--muted); }
html[data-theme="dark"] .auth-art { background:url('/assets/agri-elevated-app-icon-light.png') center/cover no-repeat; }
html[data-theme="dark"] .auth-shell.welcome-screen { background:#0a140b url('/assets/farm-sunrise.webp') 67% center/cover no-repeat; }
html[data-theme="dark"] .auth-shell.welcome-screen::before { background:linear-gradient(180deg,rgba(4,14,8,.24) 0%,rgba(4,14,8,.4) 29%,rgba(4,14,8,.69) 52%,rgba(4,14,8,.94) 77%,#050805 100%); }
html[data-theme="dark"] .welcome-screen .auth-art { background:url('/assets/agri-elevated-app-icon-light.png') center/cover no-repeat; }
html[data-theme="dark"] .auth-shell.welcome-screen p { color:#ebede7; }
html[data-theme="dark"] .welcome-screen .secondary-btn { background:#19291c;border-color:#344537;color:#f5f8ef; }
html[data-theme="dark"] .brand { color: var(--lime); }
html[data-theme="dark"] .brand-wordmark { background: var(--lime); }
html[data-theme="dark"] .admin-brand { color: var(--lime); }
html[data-theme="dark"] .brand-mark { background: #2a3c1e; color: var(--lime); }
html[data-theme="dark"] .progress { background: #2b3726; }
html[data-theme="dark"] .auth-step-label { color: var(--lime); }

/* Administration and supporting states */
html[data-theme="dark"] .admin-shell,
html[data-theme="dark"] .admin-frame { background: #10150f; }
html[data-theme="dark"] .admin-frame table { background: #1a2018; }
html[data-theme="dark"] .admin-frame th { background: #2b3822; }
html[data-theme="dark"] .admin-frame th,
html[data-theme="dark"] .admin-frame td { border-color: var(--line); }
html[data-theme="dark"] .admin-frame .admin-actions a { background: #354925; color: var(--lime); }
html[data-theme="dark"] .offline-banner { background: #3d321e; color: #f4d89c; }
html[data-theme="dark"] .empty { border-style: dashed; }
html[data-theme="dark"] .empty strong { color: var(--ink); }
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #20291d, #303b2b, #20291d); background-size: 200% 100%; }
html[data-theme="dark"] .password-toggle{color:var(--lime)}
html[data-theme="dark"] .field input[type="date"]{color-scheme:dark}
html[data-theme="dark"] .field-error{color:#ff8f87}
html[data-theme="dark"] .auth-panel .field input:-webkit-autofill{box-shadow:0 0 0 1000px #222b1f inset;-webkit-text-fill-color:var(--ink);caret-color:var(--ink);transition:background-color 9999s ease-out}
html[data-theme="dark"] .auth-panel .field input:-webkit-autofill:focus{border-color:#70a73b;box-shadow:0 0 0 1000px #222b1f inset,0 0 0 3px rgba(166,216,77,.25)}
html[data-theme="dark"] .username-field input[data-status="available"]{color:#a8eb80;-webkit-text-fill-color:#a8eb80;background:#203b25;border-color:#70bc79;caret-color:#a8eb80}
html[data-theme="dark"] .username-field input[data-status="invalid"],html[data-theme="dark"] .username-field input[data-status="taken"]{color:#ff9b94;-webkit-text-fill-color:#ff9b94;background:#392321;border-color:#dd6259;caret-color:#ff9b94}
html[data-theme="dark"] .auth-panel .username-field input[data-status="available"]:-webkit-autofill,html[data-theme="dark"] .auth-panel .username-field input[data-status="available"]:-webkit-autofill:focus{box-shadow:0 0 0 1000px #203b25 inset,0 0 0 3px rgba(112,188,121,.2);-webkit-text-fill-color:#a8eb80;border-color:#70bc79}
html[data-theme="dark"] .auth-panel .username-field input[data-status="invalid"]:-webkit-autofill,html[data-theme="dark"] .auth-panel .username-field input[data-status="taken"]:-webkit-autofill,html[data-theme="dark"] .auth-panel .username-field input[data-status="invalid"]:-webkit-autofill:focus,html[data-theme="dark"] .auth-panel .username-field input[data-status="taken"]:-webkit-autofill:focus{box-shadow:0 0 0 1000px #392321 inset,0 0 0 3px rgba(221,98,89,.16);-webkit-text-fill-color:#ff9b94;border-color:#dd6259}
html[data-theme="dark"] .username-suggestions button{background:#203b25;border-color:#477f51;color:#b7f29a}
html[data-theme="dark"] .work-choice.active{background:#344b27;border-color:#b6eb70;color:#e7ffc8}
html[data-theme="dark"] .consent-agreement{background:#27351f;border-color:#536947}
html[data-theme="dark"] .consent-agreement input{accent-color:var(--lime)}
html[data-theme="dark"] .consent-notice a{color:var(--lime)}
html[data-theme="dark"] .auth-panel .create-account-button:disabled{background:#3b4338;color:#b4bdaf;opacity:1}
html[data-theme="dark"] .dm-search,html[data-theme="dark"] .dm-bubble{background:#242d22}
html[data-theme="dark"] .dm-search input,html[data-theme="dark"] .dm-compose input{color:var(--ink)}
html[data-theme="dark"] .dm-thread-head,html[data-theme="dark"] .dm-compose{background:var(--cream)}
html[data-theme="dark"] .dm-compose input{background:#242d22;border-color:var(--line)}
html[data-theme="dark"] .farm-page .metric-income,html[data-theme="dark"] .farm-page .farm-income-action{background:#193524;border-color:#35694a;color:#a5ebba}
html[data-theme="dark"] .farm-page .metric-expense,html[data-theme="dark"] .farm-page .farm-expense-action{background:#3a2423;border-color:#78423d;color:#ffb4a8}
html[data-theme="dark"] .farm-page .metric-income strong{color:#a5ebba}
html[data-theme="dark"] .farm-page .metric-expense strong{color:#ffb4a8}
html[data-theme="dark"] .farm-page .metric-profit{background:#283b1d;border-color:#4c682f;color:#d8f7a1}
html[data-theme="dark"] .farm-page .metric-profit.is-negative{background:#39291f;border-color:#725139;color:#f6c99d}
html[data-theme="dark"] .farm-page .metric-profit span{color:#c1d6a3}
html[data-theme="dark"] .farm-page .farm-income-action .action-icon{background:#275136;color:#b6f7c8}
html[data-theme="dark"] .farm-page .farm-expense-action .action-icon{background:#5c3530;color:#ffb4a8}
html[data-theme="dark"] .break-even{background:#1a2018;border-color:#33412e;color:var(--ink)}
html[data-theme="dark"] .break-even-icon{background:#2b4328;color:#b8f18f}
html[data-theme="dark"] .break-even-track{background:#344031}
html[data-theme="dark"] .planner-total{background:#283b1d}
html[data-theme="dark"] .planner-result:nth-child(2),html[data-theme="dark"] .planner-result:nth-child(3),html[data-theme="dark"] .planner-result:nth-child(5){background:#193524;color:#a5ebba}
html[data-theme="dark"] .farm-planner-page .planner-cost-row input,html[data-theme="dark"] .farm-planner-page .planner-fields input{background:#20291e}
html[data-theme="dark"] .farm-page .metric-income{background:#1a2018;border:2px solid #478e5f}
html[data-theme="dark"] .farm-page .metric-expense{background:#1a2018;border:2px solid #b66a62}
html[data-theme="dark"] .directory-card,html[data-theme="dark"] .directory-guide{background:#1a2018;border-color:var(--line)}html[data-theme="dark"] .directory-price strong,html[data-theme="dark"] .directory-links a{color:var(--lime)}
