:root {
  color-scheme: light;
  --ink: #18211c;
  --muted: #667166;
  --soft: #f4f1e8;
  --paper: #fffdf8;
  --line: #ded8c8;
  --moss: #315f46;
  --moss-2: #47745a;
  --clay: #9a4e33;
  --ochre: #bd8b2d;
  --sky: #4f7189;
  --sage: #dfe9dc;
  --rust: #b85735;
  --danger: #b3342d;
  --warn: #c47a21;
  --ok: #27714f;
  --shadow: 0 18px 50px rgba(24, 33, 28, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(49, 95, 70, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(154, 78, 51, 0.06) 1px, transparent 1px),
    var(--soft);
  background-size: 48px 48px, 48px 48px, auto;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.login-panel {
  width: min(980px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.login-hero {
  min-height: 220px;
  color: #fff;
  background:
    linear-gradient(rgba(24, 33, 28, 0.36), rgba(24, 33, 28, 0.52)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 28px),
    linear-gradient(135deg, #315f46, #9a4e33 58%, #bd8b2d);
  display: grid;
  align-content: end;
  padding: 28px;
}

.login-brand {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.login-hero h1 {
  margin: 0;
  font-size: 4.2rem;
  line-height: 0.95;
  max-width: 780px;
}

.login-hero p {
  margin: 12px 0 0;
  max-width: 560px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.login-body {
  padding: 22px;
}

.auth-form {
  margin-top: 12px;
}

.auth-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.danger-text {
  color: var(--danger);
  border-color: rgba(179, 52, 45, 0.35);
}

.demo-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.account-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  text-align: left;
  padding: 14px;
  min-height: 92px;
}

.account-btn strong,
.record-title,
.panel-title {
  display: block;
  overflow-wrap: anywhere;
}

.account-btn span,
.small,
.muted {
  color: var(--muted);
}

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
}

.brand-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-profile-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 5px 9px 5px 5px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.brand-profile-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.brand-mark {
  width: 46px;
  height: 66px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent),
    var(--moss);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
  overflow: hidden;
  font-size: 0.86rem;
  text-align: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-mark-logo {
  background: #fff;
  width: 46px;
  height: 66px;
  border-radius: 999px;
  padding: 7px 5px;
}

.brand-mark.hero {
  width: 82px;
  height: 122px;
  font-size: 1.45rem;
  background: rgba(255, 253, 248, 0.96);
  color: var(--moss);
  box-shadow: 0 14px 34px rgba(24, 33, 28, 0.22);
}

.brand-mark.preview {
  width: 92px;
  height: 136px;
  font-size: 1.45rem;
}

.brand-mark-logo.hero {
  width: 82px;
  height: 122px;
  border-radius: 999px;
  padding: 12px 8px;
}

.brand-mark-logo.preview {
  width: 92px;
  height: 136px;
  border-radius: 999px;
  padding: 13px 9px;
}

.brand small {
  display: block;
  color: var(--muted);
}

.branding-panel {
  display: grid;
  gap: 14px;
}

.nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 12px;
  scrollbar-width: thin;
}

.nav-btn {
  min-height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

.nav-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  background: var(--clay);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.main {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px;
}

.topbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.page-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: 2.45rem;
  line-height: 1;
}

.topbar-actions,
.row,
.toolbar,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.topbar-actions {
  justify-content: flex-start;
}

.btn,
.icon-btn,
.chip,
.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.btn,
.icon-btn,
.chip {
  min-height: 42px;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 750;
}

.btn.primary {
  background: var(--moss);
  border-color: var(--moss);
  color: #fff;
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.ghost {
  background: transparent;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.file-btn input[type="file"] {
  display: none;
}

.compact-file-btn {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.user-row-actions {
  justify-content: flex-end;
}

.btn:disabled,
input:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.chip {
  color: var(--muted);
  min-height: 36px;
  padding: 8px 10px;
}

.chip.active {
  background: var(--sage);
  color: var(--ink);
  border-color: var(--moss-2);
}

.user-pill,
.status-pill,
.priority-pill,
.role-pill {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 800;
  background: #ece7d8;
  color: var(--ink);
  white-space: nowrap;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 5px;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent),
    var(--avatar-color, var(--moss));
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(24, 33, 28, 0.18);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 0.68rem;
}

.avatar.profile-large {
  width: 116px;
  height: 116px;
  font-size: 2rem;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.profile-nav-btn.active {
  background: var(--moss);
  border-color: var(--moss);
  color: #fff;
}

.profile-hero-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.profile-photo-stage {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), transparent),
    rgba(49, 95, 70, 0.12);
}

.profile-hero-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.profile-photo-upload {
  width: fit-content;
}

.person-line,
.message-author {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.person-line > div,
.activity-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.status-planned,
.status-open {
  background: #e8edf1;
  color: #354f63;
}

.status-active,
.status-in-progress {
  background: #dfe9dc;
  color: #244f39;
}

.status-waiting {
  background: #fff0cc;
  color: #7c5110;
}

.status-blocked,
.priority-urgent {
  background: #f8d7d1;
  color: #842b22;
}

.status-completed,
.status-approved {
  background: #d6eadc;
  color: #21573a;
}

.status-gotten {
  background: #d6eadc;
  color: #21573a;
}

.status-needed {
  background: #fff0cc;
  color: #70510e;
}

.status-offline,
.status-out-of-service,
.status-denied {
  background: #f8d7d1;
  color: #842b22;
}

.priority-high {
  background: #ffe5cd;
  color: #814714;
}

.priority-medium {
  background: #fff0cc;
  color: #70510e;
}

.priority-low {
  background: #dfe9dc;
  color: #315f46;
}

.grid {
  display: grid;
  gap: 12px;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.two-col {
  display: grid;
  gap: 14px;
}

.card,
.panel,
.modal-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(24, 33, 28, 0.08);
}

.card {
  padding: 14px;
}

.card.clickable {
  text-align: left;
  width: 100%;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.stat-card {
  min-height: 132px;
  display: grid;
  align-content: space-between;
}

.stat-value {
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 900;
}

.stat-card[data-tone="moss"] {
  border-top: 5px solid var(--moss);
}

.stat-card[data-tone="clay"] {
  border-top: 5px solid var(--clay);
}

.stat-card[data-tone="ochre"] {
  border-top: 5px solid var(--ochre);
}

.stat-card[data-tone="sky"] {
  border-top: 5px solid var(--sky);
}

.progress-line {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: #e7e1d0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--moss), var(--ochre));
}

.project-progress {
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 4px 10px;
  margin-top: 12px;
}

.project-progress .progress-line {
  grid-column: 1;
  margin-top: 0;
}

.slider-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
}

.slider-label {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.slider-row > strong {
  grid-column: 2;
  justify-self: end;
}

.slider-row input[type="range"] {
  grid-column: 1;
}

input[type="range"] {
  width: 100%;
  min-width: 140px;
  height: 34px;
  accent-color: var(--moss);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: #d9d2bf;
  border: 1px solid #c9c0aa;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--moss);
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(24, 33, 28, 0.28);
  margin-top: -7px;
}

input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: #d9d2bf;
  border: 1px solid #c9c0aa;
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--moss);
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(24, 33, 28, 0.28);
}

.field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: #fff;
  min-height: 44px;
  padding: 10px 11px;
  color: var(--ink);
}

.field textarea {
  min-height: 104px;
  resize: vertical;
}

.filters {
  margin: 0 0 12px;
  display: grid;
  gap: 10px;
}

.filter-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.list {
  display: grid;
  gap: 10px;
}

.task-section {
  display: grid;
  gap: 10px;
}

.task-section-head {
  padding: 0 2px;
}

.compact-list {
  display: grid;
  gap: 8px;
}

.list-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
}

.activity-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.profile-work-grid {
  align-items: start;
}

.profile-complete-list,
.profile-win-list {
  margin-top: 12px;
}

.profile-completion-row {
  background:
    linear-gradient(135deg, rgba(39, 113, 79, 0.08), transparent),
    var(--paper);
}

.profile-stat-card {
  min-height: 120px;
}

.accomplishment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.accomplishment-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(102, 113, 102, 0.08), transparent),
    var(--paper);
}

.accomplishment-card strong {
  font-size: 1rem;
}

.accomplishment-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.accomplishment-card small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.accomplishment-card.unlocked {
  border-color: rgba(39, 113, 79, 0.42);
  background:
    linear-gradient(145deg, rgba(39, 113, 79, 0.16), transparent),
    var(--paper);
}

.accomplishment-card.unlocked small {
  color: var(--ok);
}

.accomplishment-card.locked {
  opacity: 0.72;
}

.list-row.overdue {
  border-color: rgba(179, 52, 45, 0.5);
  background: #fff8f6;
}

.dashboard-chat-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-chat-form .field {
  gap: 5px;
}

.dashboard-chat-form textarea {
  min-height: 68px;
}

.chat-upload-field {
  gap: 4px;
}

.chat-upload-field > span {
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.chat-composer .chat-upload-field input[type="file"] {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 0.76rem;
}

.chat-composer .chat-upload-field input[type="file"]::file-selector-button {
  margin-right: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(208, 174, 111, 0.14);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-chat-form .chat-upload-field > span {
  font-size: 0.68rem;
}

.dashboard-chat-form .chat-upload-field input[type="file"] {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 0.7rem;
}

.dashboard-chat-card .messages {
  margin-top: 12px;
  max-height: 360px;
}

.dashboard-chat-card .message {
  width: 100%;
}

.ai-assistant-card {
  display: grid;
  gap: 12px;
}

.ai-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  flex: 0 0 auto;
}

.ai-avatar.small {
  width: 26px;
  height: 26px;
  font-size: 0.72rem;
}

.ai-suggestions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ai-suggestions .chip {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.ai-messages {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.ai-message {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px 10px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.ai-message.user {
  background: #edf4eb;
  border-color: #c7dbc5;
}

.ai-message p {
  margin: 4px 0;
}

.ai-form {
  gap: 8px;
}

.ai-form textarea {
  min-height: 74px;
}

.checkline {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.checkline > div {
  min-width: 0;
}

.checkline input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--moss);
}

.meta-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 12px;
}

.meta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  background: #fff;
}

.meta span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meta strong {
  display: block;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.map-layout {
  display: grid;
  gap: 12px;
}

.map-location-card {
  display: grid;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(24, 33, 28, 0.08);
  padding: 14px;
}

.map-stage {
  position: relative;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(35deg, rgba(49, 95, 70, 0.22), transparent 32%),
    linear-gradient(130deg, transparent 0 55%, rgba(189, 139, 45, 0.25) 56% 64%, transparent 65%),
    repeating-linear-gradient(18deg, rgba(24, 33, 28, 0.1) 0 2px, transparent 2px 24px),
    #dfe9dc;
}

.map-road,
.map-pond,
.map-fence,
.map-trail {
  position: absolute;
  pointer-events: none;
}

.map-road {
  left: -6%;
  top: 54%;
  width: 118%;
  height: 18px;
  border-radius: 999px;
  background: rgba(119, 99, 72, 0.68);
  transform: rotate(-12deg);
  box-shadow: 0 0 0 4px rgba(255, 253, 248, 0.28);
}

.map-trail {
  right: 3%;
  top: 18%;
  width: 70%;
  height: 6px;
  border-top: 3px dashed rgba(154, 78, 51, 0.72);
  transform: rotate(28deg);
}

.map-pond {
  left: 58%;
  top: 58%;
  width: 180px;
  max-width: 34vw;
  aspect-ratio: 1.8 / 1;
  border-radius: 52% 48% 58% 42%;
  background: rgba(79, 113, 137, 0.78);
  border: 4px solid rgba(255, 253, 248, 0.48);
}

.map-fence {
  left: 10%;
  top: 10%;
  width: 80%;
  height: 76%;
  border: 3px dashed rgba(24, 33, 28, 0.42);
  border-radius: 22px;
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  border: 2px solid #fff;
  box-shadow: 0 6px 16px rgba(24, 33, 28, 0.24);
  color: #fff;
  min-width: 34px;
  height: 34px;
  border-radius: 999px 999px 999px 4px;
  rotate: -45deg;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.map-pin span {
  rotate: 45deg;
  font-size: 0.72rem;
}

.map-center-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}

.map-center-marker strong {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 14px 32px rgba(24, 33, 28, 0.28);
}

.map-center-marker span {
  max-width: 160px;
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  padding: 6px 9px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.map-panel {
  padding: 14px;
}

.cat-gate,
.cat-fence {
  background: var(--clay);
}

.cat-road,
.cat-trail {
  background: #776348;
}

.cat-pond,
.cat-dock {
  background: var(--sky);
}

.cat-barn,
.cat-equipment {
  background: var(--ochre);
}

.cat-camera,
.cat-feeder,
.cat-stand {
  background: var(--moss);
}

.cat-utility,
.cat-animal,
.cat-project {
  background: #5f577d;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.thumb {
  aspect-ratio: 1 / 0.75;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #eee7d7;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 8px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.animal-live-cameras {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.animal-live-cameras.card {
  margin-top: 0;
}

.animal-live-cameras .panel-title {
  font-size: 1rem;
}

.animal-camera-grid {
  display: grid;
  gap: 8px;
}

.live-camera-tile {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 9px;
}

.live-camera-preview {
  min-height: 58px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  background: #6f6556;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.live-camera-preview.is-live {
  background: linear-gradient(135deg, var(--moss), #263d2f);
}

.live-camera-preview.is-offline {
  background: linear-gradient(135deg, #8d3f35, #4b302c);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.live-camera-copy,
.live-camera-stats {
  display: grid;
  gap: 3px;
}

.live-camera-stats {
  color: var(--muted);
  font-size: 0.78rem;
}

.calendar-shell {
  display: grid;
  gap: 12px;
}

.calendar-toolbar {
  align-items: end;
}

.calendar-picker {
  display: grid;
  gap: 5px;
  flex: 1 1 220px;
  min-width: min(100%, 220px);
}

.calendar-picker span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calendar-picker select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 750;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

.calendar-day,
.weekday {
  min-height: 86px;
  background: #fff;
  padding: 8px;
}

.weekday {
  min-height: auto;
  font-weight: 900;
  color: var(--muted);
  text-align: center;
}

.calendar-day.off {
  background: #f3efe3;
  color: #9c9688;
}

.day-number {
  font-weight: 900;
}

.event-dot {
  margin-top: 5px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.74rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.mini-months {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.mini-month {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
}

.budget-bars {
  display: grid;
  gap: 10px;
}

.budget-command-card {
  display: grid;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(24, 33, 28, 0.08);
  padding: 14px;
}

.budget-form {
  display: grid;
  gap: 10px;
  align-content: end;
}

.budget-row {
  display: grid;
  gap: 6px;
}

.equipment-page {
  gap: 18px;
}

.equipment-add-card {
  display: grid;
  gap: 12px;
}

.equipment-section {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.equipment-section-head {
  padding: 0 2px;
}

.equipment-needed-form {
  margin: 0;
}

.equipment-needed-list {
  margin-top: 0;
}

.chat-shell {
  display: grid;
  gap: 10px;
}

.thread-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  align-items: stretch;
}

.chat-new-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 10px;
  white-space: nowrap;
}

.thread-btn {
  flex: 0 0 auto;
  min-height: 38px;
  max-width: 220px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 0.88rem;
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-btn.active {
  background: var(--ink);
  color: #fff;
}

.chat-shell > .panel.card {
  padding: 12px;
}

.messages {
  display: grid;
  gap: 6px;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.message {
  width: min(760px, 96%);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 7px 9px;
  font-size: 0.88rem;
  line-height: 1.32;
}

.message.mine {
  justify-self: end;
  background: #edf4eb;
  border-color: #c7dbc5;
}

.message strong {
  display: block;
  font-size: 0.82rem;
}

.message-author {
  margin-bottom: 4px;
}

.message p {
  margin: 3px 0 4px;
}

.message small {
  font-size: 0.72rem;
}

.chat-shell textarea[name="message"] {
  min-height: 72px;
}

.chat-shell form.field-grid {
  gap: 8px;
  margin-top: 8px;
}

.chat-shell .field input,
.chat-shell .field textarea {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.92rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 33, 28, 0.54);
  display: grid;
  place-items: end center;
  padding: 12px;
}

.modal-panel {
  width: min(920px, 100%);
  max-height: min(92vh, 960px);
  overflow: auto;
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.modal-body {
  padding: 14px;
  display: grid;
  gap: 14px;
}

.crop-modal-panel {
  width: min(780px, 100%);
}

.crop-modal-body {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  align-items: center;
}

.crop-preview-wrap {
  display: grid;
  place-items: center;
}

.crop-preview {
  width: min(300px, 72vw);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background:
    linear-gradient(45deg, rgba(255, 242, 216, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 242, 216, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 242, 216, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 242, 216, 0.12) 75%),
    rgba(24, 24, 19, 0.78);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.crop-preview.logo-crop {
  width: min(260px, 64vw);
  aspect-ratio: 7 / 11;
  border-radius: 999px;
}

.crop-preview.profile-crop {
  border-radius: 999px;
}

.crop-preview img {
  width: 100%;
  height: 100%;
  transform: translate(var(--crop-x, 0), var(--crop-y, 0)) scale(var(--crop-zoom, 1));
  transform-origin: center;
  will-change: transform;
  pointer-events: none;
}

.crop-preview.logo-crop img {
  object-fit: contain;
}

.crop-preview.profile-crop img {
  object-fit: cover;
}

.crop-controls {
  width: 100%;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.65);
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.table-caption {
  padding: 14px 14px 0;
}

.table-caption p {
  margin: 0 0 6px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 680px;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 13px;
  z-index: 200;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

@media (max-width: 679px) {
  .profile-hero-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-photo-stage {
    width: 126px;
    height: 126px;
  }

  .avatar.profile-large {
    width: 102px;
    height: 102px;
  }

  .crop-modal-body {
    grid-template-columns: 1fr;
  }

  .crop-preview {
    width: min(260px, 74vw);
  }
}

@media (min-width: 680px) {
  .topbar {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field.wide {
    grid-column: 1 / -1;
  }

  .calendar-day {
    min-height: 118px;
  }
}

@media (min-width: 980px) {
  .shell {
    flex-direction: row;
  }

  .sidebar {
    width: 268px;
    min-height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    display: flex;
    flex-direction: column;
  }

  .brand {
    padding: 18px;
  }

  .nav {
    flex-direction: column;
    overflow: visible;
    padding: 0 14px 18px;
  }

  .nav-btn {
    width: 100%;
    justify-content: space-between;
  }

  .main {
    padding: 24px;
  }

  .two-col {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
  }

  .map-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .map-location-card {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .budget-command-card {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .chat-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .thread-list {
    display: grid;
    overflow: visible;
    align-content: start;
  }

  .chat-new-btn,
  .thread-btn {
    max-width: 100%;
    width: 100%;
  }

  .modal {
    place-items: center;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 12px 10px 80px;
  }

  .card,
  .panel,
  .modal-body {
    padding: 12px;
  }

  .calendar-grid {
    font-size: 0.82rem;
  }

  .calendar-day {
    min-height: 76px;
    padding: 5px;
  }

  .event-dot {
    padding: 3px 4px;
  }
}

/* Luxury Ranch Command Center theme */
:root {
  color-scheme: dark;
  --ink: #f5ead7;
  --muted: #a99c84;
  --soft: #090a08;
  --paper: rgba(25, 26, 22, 0.88);
  --line: rgba(208, 174, 111, 0.24);
  --moss: #788554;
  --moss-2: #9bab6a;
  --clay: #b06a45;
  --ochre: #caa35a;
  --sky: #6f8e94;
  --sage: rgba(120, 133, 84, 0.22);
  --rust: #ba5e3f;
  --danger: #d15f50;
  --warn: #d39a45;
  --ok: #85a96b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --panel: rgba(20, 21, 18, 0.82);
  --panel-strong: rgba(31, 31, 26, 0.94);
  --brass-soft: rgba(202, 163, 90, 0.18);
  --cream: #fff2d8;
}

body {
  background:
    repeating-linear-gradient(135deg, rgba(255, 242, 216, 0.024) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(45deg, rgba(202, 163, 90, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, #11120f 0%, #080908 48%, #050604 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, transparent, rgba(202, 163, 90, 0.035), transparent);
  mix-blend-mode: screen;
}

.login-panel,
.sidebar,
.topbar,
.card,
.panel,
.modal-panel,
.map-location-card,
.budget-command-card,
.table-wrap {
  background:
    linear-gradient(145deg, rgba(255, 242, 216, 0.065), rgba(255, 242, 216, 0.018)),
    var(--panel);
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-hero {
  background:
    linear-gradient(145deg, rgba(10, 11, 9, 0.2), rgba(10, 11, 9, 0.88)),
    repeating-linear-gradient(0deg, rgba(202, 163, 90, 0.08) 0 1px, transparent 1px 19px),
    linear-gradient(135deg, #161813, #2a241a 54%, #10120f);
}

.login-body,
.account-btn,
.modal-head {
  background: var(--panel-strong);
}

.login-hero h1,
.topbar h2,
.panel-title,
.record-title,
.stat-value {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.login-hero h1 {
  font-size: 4.2rem;
}

.topbar h2 {
  font-size: 2.45rem;
}

.login-hero p,
.muted,
.small,
.account-btn span {
  color: var(--muted);
}

.brand {
  border-bottom: 1px solid var(--line);
}

.brand strong {
  color: var(--cream);
}

.brand-profile-btn {
  background: rgba(255, 242, 216, 0.055);
  border-color: rgba(208, 174, 111, 0.26);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.brand-profile-btn.active {
  background: linear-gradient(135deg, #80672e, #caa35a);
  border-color: rgba(255, 232, 178, 0.48);
  color: #10110e;
}

.brand-mark {
  background:
    linear-gradient(145deg, rgba(255, 244, 216, 0.55), transparent),
    linear-gradient(135deg, #d4b06a, #77612f);
  border: 1px solid rgba(255, 232, 178, 0.32);
  color: #12120f;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.brand-mark-logo {
  background: #f6ead2;
  border-radius: 999px;
}

.brand-mark.hero,
.brand-mark.preview {
  background:
    linear-gradient(145deg, rgba(255, 244, 216, 0.62), transparent),
    linear-gradient(135deg, #e5c577, #8c7136);
  color: #10110e;
}

.nav {
  scrollbar-color: var(--ochre) transparent;
}

.nav-btn {
  background: rgba(255, 242, 216, 0.04);
  border-color: transparent;
  color: var(--muted);
  min-height: 40px;
}

.nav-btn:hover,
.nav-btn.active {
  background:
    linear-gradient(135deg, rgba(202, 163, 90, 0.24), rgba(120, 133, 84, 0.18));
  border-color: rgba(202, 163, 90, 0.42);
  color: var(--cream);
  box-shadow: inset 3px 0 0 var(--ochre), 0 10px 26px rgba(0, 0, 0, 0.28);
}

.nav-icon,
.stat-icon,
.btn-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.nav-icon svg,
.stat-icon svg,
.btn-icon svg {
  width: 100%;
  height: 100%;
}

.stat-icon {
  width: 30px;
  height: 30px;
  padding: 5px;
  color: var(--ochre);
  border: 1px solid rgba(202, 163, 90, 0.32);
  border-radius: var(--radius);
  background: rgba(202, 163, 90, 0.1);
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.main {
  position: relative;
}

.topbar {
  padding: 16px;
  border-radius: var(--radius);
  position: sticky;
  top: 8px;
  z-index: 40;
}

.topbar-title {
  min-width: 0;
}

.topbar-intel {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.topbar-intel span {
  border: 1px solid rgba(202, 163, 90, 0.24);
  border-radius: 999px;
  background: rgba(255, 242, 216, 0.055);
  color: var(--muted);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.topbar-actions {
  justify-content: flex-start;
}

.btn,
.icon-btn,
.chip,
.thread-btn,
.calendar-picker select,
.field input,
.field select,
.field textarea {
  background: rgba(255, 242, 216, 0.055);
  border-color: rgba(208, 174, 111, 0.26);
  color: var(--ink);
}

.btn,
.icon-btn,
.chip,
.thread-btn {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn.primary,
.chip.active,
.thread-btn.active {
  background: linear-gradient(135deg, #80672e, #caa35a);
  border-color: rgba(255, 232, 178, 0.48);
  color: #10110e;
}

.btn.ghost {
  color: var(--muted);
  border-color: rgba(208, 174, 111, 0.18);
}

.alert-btn {
  color: var(--cream);
}

.badge {
  background: linear-gradient(135deg, var(--clay), #7d372d);
  color: var(--cream);
  border: 1px solid rgba(255, 232, 178, 0.25);
}

.user-pill,
.status-pill,
.priority-pill,
.role-pill {
  background: rgba(255, 242, 216, 0.08);
  border: 1px solid rgba(208, 174, 111, 0.22);
  color: var(--cream);
}

.user-chip .role-pill {
  margin-left: 4px;
}

.avatar {
  border-color: rgba(255, 232, 178, 0.62);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.status-planned,
.status-open {
  background: rgba(111, 142, 148, 0.18);
  color: #b7d6db;
}

.status-active,
.status-in-progress,
.status-gotten,
.status-approved {
  background: rgba(120, 133, 84, 0.22);
  color: #c9dda2;
}

.status-waiting,
.status-needed,
.priority-medium {
  background: rgba(202, 163, 90, 0.2);
  color: #f0cf83;
}

.status-blocked,
.status-offline,
.status-out-of-service,
.status-denied,
.priority-urgent {
  background: rgba(209, 95, 80, 0.18);
  color: #f0a096;
}

.priority-high {
  background: rgba(176, 106, 69, 0.22);
  color: #e6ae87;
}

.priority-low {
  background: rgba(120, 133, 84, 0.17);
  color: #b8cc90;
}

.card,
.panel,
.modal-panel,
.map-location-card,
.budget-command-card {
  position: relative;
}

.card::before,
.panel::before,
.modal-panel::before,
.map-location-card::before,
.budget-command-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 242, 216, 0.07), transparent 38%);
}

.card > *,
.panel > *,
.modal-panel > *,
.map-location-card > *,
.budget-command-card > * {
  position: relative;
}

.stat-card {
  min-height: 142px;
  overflow: hidden;
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-card[data-tone="moss"],
.stat-card[data-tone="clay"],
.stat-card[data-tone="ochre"],
.stat-card[data-tone="sky"] {
  border-top: 1px solid var(--line);
}

.stat-card[data-tone="moss"] {
  box-shadow: inset 0 4px 0 var(--moss), var(--shadow);
}

.stat-card[data-tone="clay"] {
  box-shadow: inset 0 4px 0 var(--clay), var(--shadow);
}

.stat-card[data-tone="ochre"] {
  box-shadow: inset 0 4px 0 var(--ochre), var(--shadow);
}

.stat-card[data-tone="sky"] {
  box-shadow: inset 0 4px 0 var(--sky), var(--shadow);
}

.progress-track,
input[type="range"]::-webkit-slider-runnable-track,
input[type="range"]::-moz-range-track {
  background: rgba(255, 242, 216, 0.17);
  border-color: rgba(208, 174, 111, 0.18);
}

.progress-fill {
  background: linear-gradient(90deg, var(--moss), var(--ochre));
}

input[type="range"]::-webkit-slider-thumb {
  background: var(--ochre);
  border-color: #181813;
}

input[type="range"]::-moz-range-thumb {
  background: var(--ochre);
  border-color: #181813;
}

.field label,
.field > span,
.calendar-picker span,
.slider-label,
.meta span,
th,
.page-kicker {
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  box-shadow: inset 0 1px 0 rgba(255, 242, 216, 0.045);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 1px solid rgba(202, 163, 90, 0.72);
  border-color: rgba(202, 163, 90, 0.72);
}

.list-row,
.meta,
.live-camera-tile,
.mini-month,
.message,
.ai-message,
.thumb,
.calendar-day,
.weekday {
  background: rgba(255, 242, 216, 0.055);
  border-color: rgba(208, 174, 111, 0.2);
}

.list-row.overdue,
.message.mine,
.ai-message.user {
  background: rgba(120, 133, 84, 0.13);
  border-color: rgba(120, 133, 84, 0.38);
}

.empty {
  background: rgba(255, 242, 216, 0.04);
  border-color: rgba(208, 174, 111, 0.28);
}

.ai-avatar {
  background: linear-gradient(135deg, #caa35a, #5c4a27);
  color: #10110e;
}

.map-stage {
  background:
    linear-gradient(35deg, rgba(120, 133, 84, 0.28), transparent 32%),
    linear-gradient(130deg, transparent 0 55%, rgba(202, 163, 90, 0.2) 56% 64%, transparent 65%),
    repeating-linear-gradient(18deg, rgba(255, 242, 216, 0.045) 0 2px, transparent 2px 24px),
    #171b13;
}

.map-road {
  background: rgba(138, 111, 69, 0.72);
  box-shadow: 0 0 0 4px rgba(15, 15, 12, 0.42);
}

.map-trail {
  border-top-color: rgba(202, 163, 90, 0.74);
}

.map-pond {
  background: rgba(70, 105, 111, 0.78);
  border-color: rgba(255, 232, 178, 0.26);
}

.map-fence {
  border-color: rgba(202, 163, 90, 0.44);
}

.map-center-marker strong {
  background: #12130f;
  border-color: var(--ochre);
}

.map-center-marker span {
  background: rgba(18, 19, 15, 0.9);
  border-color: var(--line);
  color: var(--cream);
}

.live-camera-preview,
.live-camera-preview.is-live {
  background: linear-gradient(135deg, #1f2c20, #55643f);
}

.live-camera-preview.is-offline {
  background: linear-gradient(135deg, #43201c, #8b4136);
}

.calendar-grid {
  background: rgba(208, 174, 111, 0.22);
  border-color: var(--line);
}

.calendar-day.off {
  background: rgba(255, 242, 216, 0.025);
  color: #6f6758;
}

.event-dot {
  border: 1px solid rgba(255, 232, 178, 0.24);
  color: #11110f;
  font-weight: 850;
}

.table-wrap {
  background: var(--panel);
}

table {
  color: var(--ink);
}

td,
th {
  border-bottom-color: rgba(208, 174, 111, 0.16);
}

.modal {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.toast {
  background: linear-gradient(135deg, #1f1f1a, #090a08);
  color: var(--cream);
  border: 1px solid var(--line);
}

@media (min-width: 680px) {
  .topbar {
    align-items: center;
  }

  .topbar-actions {
    justify-content: flex-end;
  }
}

@media (min-width: 980px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 246px;
    height: 100vh;
    min-height: 100vh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .brand {
    padding: 18px 16px;
  }

  .nav {
    padding: 12px 12px 18px;
  }

  .nav-btn {
    min-height: 38px;
    padding: 8px 10px;
    justify-content: flex-start;
  }

  .nav-btn .badge {
    margin-left: auto;
  }

  .main {
    width: auto;
    max-width: none;
    margin: 0 0 0 246px;
    padding: 24px;
  }

  .topbar {
    top: 14px;
  }
}

@media (max-width: 520px) {
  .login-hero h1 {
    font-size: 2.35rem;
  }

  .topbar h2 {
    font-size: 1.9rem;
  }

  .topbar {
    top: 6px;
    padding: 12px;
  }

  .topbar-intel {
    gap: 5px;
  }

  .topbar-intel span {
    font-size: 0.72rem;
  }

  .user-chip .role-pill {
    display: none;
  }
}
