:root {
  --paper: #f5f2eb;
  --paper-deep: #ebe5d8;
  --ink: #17201c;
  --muted: #6e756f;
  --line: rgba(23, 32, 28, 0.14);
  --gold: #b9934a;
  --gold-deep: #8d6a2e;
  --white: #ffffff;
  --danger: #a43b3b;
  --danger-bg: #fff0ee;
  --success: #206a48;
  --success-bg: #e9f7ef;
  --shadow: 0 24px 70px rgba(30, 33, 29, 0.12);
  --radius-large: 28px;
  --radius-medium: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.landing-page {
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(30, 38, 33, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 38, 33, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 78% 0%, rgba(185, 147, 74, 0.2), transparent 34rem),
    #f3f0e8;
  background-size: 72px 72px, 72px 72px, auto, auto;
}

.landing-page::before {
  position: fixed;
  z-index: 0;
  top: -28rem;
  left: -19rem;
  width: 56rem;
  height: 56rem;
  border: 1px solid rgba(185, 147, 74, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 6rem rgba(185, 147, 74, 0.025), 0 0 0 12rem rgba(185, 147, 74, 0.02);
  content: "";
  pointer-events: none;
}

.landing-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 84px;
}

.landing-nav {
  display: flex;
  min-height: 92px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.landing-wordmark {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.landing-wordmark__crown {
  display: grid;
  width: 42px;
  height: 42px;
  color: #f8f3e9;
  background: var(--ink);
  border-radius: 50%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 1.22rem;
}

.landing-wordmark > span:last-child {
  display: grid;
}

.landing-wordmark strong {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.landing-wordmark small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.secure-note {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.secure-note > span {
  width: 7px;
  height: 7px;
  background: #3a7b59;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(58, 123, 89, 0.12);
}

.landing-header {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 64px;
  align-items: end;
  padding: clamp(68px, 10vw, 116px) 0 54px;
}

.landing-header h1,
.area-hero h1,
.admin-heading h1,
.access-panel h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.landing-header h1 {
  font-size: clamp(3.35rem, 7.4vw, 6.8rem);
  line-height: 0.91;
}

.landing-header h1 em {
  color: var(--gold-deep);
  font-weight: 400;
}

.landing-intro {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.brand-card {
  position: relative;
  display: flex;
  min-height: 380px;
  padding: 30px;
  overflow: hidden;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  text-decoration: none;
  flex-direction: column;
  isolation: isolate;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.brand-card:hover {
  box-shadow: 0 30px 80px rgba(30, 33, 29, 0.2);
  transform: translateY(-4px);
}

.brand-card:focus-visible,
.admin-tool-link:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.quiet-button:focus-visible,
.back-link:focus-visible,
.text-link:focus-visible {
  outline: 3px solid rgba(185, 147, 74, 0.7);
  outline-offset: 4px;
}

.brand-card--cattle {
  background:
    linear-gradient(145deg, rgba(77, 118, 90, 0.38), rgba(8, 24, 16, 0.4)),
    #244735;
}

.brand-card--oil {
  background:
    linear-gradient(145deg, rgba(134, 119, 86, 0.2), rgba(5, 10, 12, 0.46)),
    #20272a;
}

.brand-card::after {
  position: absolute;
  z-index: -1;
  right: -90px;
  bottom: -148px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(255, 255, 255, 0.018), 0 0 0 108px rgba(255, 255, 255, 0.012);
  content: "";
}

.brand-card__glow {
  position: absolute;
  z-index: -1;
  top: -10rem;
  left: -8rem;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 68%);
  pointer-events: none;
}

.brand-card__topline,
.brand-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-monogram {
  display: grid;
  width: 49px;
  height: 49px;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 0.83rem;
  letter-spacing: 0.03em;
}

.brand-card__index {
  color: rgba(255, 255, 255, 0.42);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.brand-card__content {
  display: flex;
  margin-top: auto;
  flex-direction: column;
}

.brand-card__eyebrow {
  margin-top: auto;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-card__title {
  max-width: 390px;
  margin-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.brand-card__description {
  max-width: 430px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.83rem;
  line-height: 1.65;
}

.brand-card__footer {
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-label {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.7rem;
  font-weight: 650;
}

.auth-label > span {
  margin-right: 5px;
  color: #9dc7a9;
  font-size: 0.55rem;
}

.brand-card__action {
  font-size: 0.88rem;
  font-weight: 700;
}

.landing-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.025em;
}

.admin-tool-link {
  position: fixed;
  z-index: 3;
  right: 26px;
  bottom: 24px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 11px 15px;
  color: #5d625e;
  background: rgba(245, 242, 235, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-tool-link:hover {
  color: var(--ink);
  border-color: rgba(185, 147, 74, 0.5);
}

.admin-tool-link__icon {
  color: var(--gold-deep);
}

.landing-page--simple {
  background:
    radial-gradient(circle at 50% 0%, rgba(185, 147, 74, 0.12), transparent 30rem),
    #f4f1e9;
}

.landing-page--simple::before {
  display: none;
}

.simple-landing-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(920px, calc(100% - 40px));
  min-height: 100vh;
  align-content: center;
  margin: 0 auto;
  padding: 64px 0 92px;
}

.simple-landing-header {
  margin-bottom: 36px;
  text-align: center;
}

.simple-crown-mark {
  display: block;
  width: 66px;
  margin: 0 auto 22px;
  color: var(--gold-deep);
}

.simple-crown-mark svg {
  display: block;
  width: 100%;
  height: auto;
  fill: rgba(185, 147, 74, 0.05);
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.simple-landing-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 8vw, 5.4rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.simple-brand-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.simple-brand-card {
  position: relative;
  display: flex;
  min-height: 230px;
  justify-content: flex-end;
  padding: 30px;
  overflow: hidden;
  color: var(--white);
  border-radius: 24px;
  box-shadow: 0 20px 55px rgba(30, 33, 29, 0.12);
  text-decoration: none;
  flex-direction: column;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.simple-brand-card::after {
  position: absolute;
  right: -80px;
  bottom: -105px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  content: "";
}

.simple-brand-card:hover {
  box-shadow: 0 25px 65px rgba(30, 33, 29, 0.19);
  transform: translateY(-3px);
}

.simple-brand-card:focus-visible {
  outline: 3px solid rgba(185, 147, 74, 0.7);
  outline-offset: 4px;
}

.simple-brand-card--cattle {
  background: linear-gradient(145deg, #315c45, #244533);
}

.simple-brand-card--oil {
  background:
    radial-gradient(circle at 90% 10%, rgba(203, 163, 75, 0.14), transparent 45%),
    linear-gradient(145deg, #171717, #050505);
  border: 1px solid rgba(203, 163, 75, 0.45);
  box-shadow: 0 20px 55px rgba(25, 19, 7, 0.2), inset 0 0 0 1px rgba(255, 220, 140, 0.05);
}

.simple-brand-card--oil::after {
  display: none;
}

.simple-brand-card__crown {
  position: absolute;
  z-index: 0;
  top: 12px;
  right: 24px;
  color: rgba(255, 255, 255, 0.08);
  font-family: Georgia, serif;
  font-size: 7.5rem;
  line-height: 1;
  transform: rotate(-8deg);
}

.simple-brand-card--oil .simple-brand-card__crown {
  color: rgba(211, 170, 79, 0.25);
  text-shadow: 0 0 35px rgba(211, 170, 79, 0.12);
}

.simple-brand-card--oil strong {
  color: #f0d79e;
}

.simple-brand-card--oil > span:last-child {
  color: #d9b866;
}

.simple-brand-card strong {
  position: relative;
  z-index: 1;
  max-width: 360px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.simple-brand-card > span {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  font-weight: 750;
}

.simple-brand-card > .simple-brand-card__crown {
  position: absolute;
  z-index: 0;
  top: 10px;
  right: 22px;
  margin: 0;
  color: rgba(255, 255, 255, 0.08);
  font-family: Georgia, serif;
  font-size: 7.5rem;
  font-weight: 400;
  line-height: 1;
  transform: rotate(-8deg);
}

.simple-brand-card--oil > .simple-brand-card__crown {
  color: rgba(211, 170, 79, 0.25);
}

.simple-brand-card > svg.simple-brand-card__crown {
  width: 154px;
  height: 116px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.access-page {
  background:
    linear-gradient(135deg, rgba(185, 147, 74, 0.12), transparent 40%),
    var(--paper);
}

.theme-cattle {
  --theme: #315c45;
  --theme-soft: #e7eee9;
}

.theme-oil {
  --theme: #252d31;
  --theme-soft: #e7e9e9;
}

.admin-login-page,
.admin-page {
  --theme: #8d6a2e;
  --theme-soft: #f4eddf;
}

.centered-shell {
  display: grid;
  align-content: center;
  width: min(620px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 0;
}

.back-link {
  justify-self: start;
  margin: 0 0 20px 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.access-panel {
  padding: clamp(32px, 7vw, 58px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.access-panel__mark {
  width: 48px;
  height: 48px;
  margin-bottom: 34px;
  color: var(--theme, var(--gold-deep));
  background: var(--theme-soft, var(--paper-deep));
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  line-height: 48px;
  text-align: center;
}

.access-panel__mark--admin {
  font-family: inherit;
  font-size: 1.2rem;
}

.access-panel h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1;
}

.panel-copy {
  max-width: 470px;
  margin: 20px 0 30px;
  color: var(--muted);
  line-height: 1.65;
}

.stacked-form {
  display: grid;
  gap: 10px;
}

.stacked-form label {
  margin-top: 6px;
  color: #4d554f;
  font-size: 0.79rem;
  font-weight: 750;
}

.stacked-form input,
.stacked-form select {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d5d5cf;
  border-radius: 11px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.stacked-form input:focus,
.stacked-form select:focus {
  border-color: var(--theme, var(--gold));
  box-shadow: 0 0 0 4px rgba(185, 147, 74, 0.14);
}

.account-empty-note {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: #315c45;
  background: #edf4ef;
  border: 1px solid rgba(49, 92, 69, 0.16);
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.account-empty-note span {
  color: var(--muted);
}

.account-empty-note a {
  justify-self: start;
  margin-top: 3px;
  font-weight: 750;
}

.primary-button,
.secondary-button,
.quiet-button {
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 50px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 0.86rem;
  font-weight: 750;
}

.primary-button {
  color: var(--white);
  background: var(--theme, var(--ink));
}

.primary-button:hover {
  filter: brightness(1.08);
}

.secondary-button {
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

.button-link {
  text-decoration: none;
}

.alert {
  margin: 0 0 22px;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.alert--error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(164, 59, 59, 0.18);
}

.alert--success {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(32, 106, 72, 0.18);
}

.area-page {
  background:
    radial-gradient(circle at 80% 8%, var(--theme-soft), transparent 34rem),
    var(--paper);
}

.area-nav {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 650;
  text-decoration: none;
}

.wordmark span {
  color: var(--gold-deep);
}

.area-nav__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.area-nav__actions form {
  margin: 0;
}

.text-link,
.quiet-button {
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.quiet-button {
  border: 1px solid var(--line);
  border-radius: 999px;
}

.area-shell {
  width: min(1020px, calc(100% - 40px));
  margin: 0 auto;
  padding: 100px 0;
}

.area-hero {
  max-width: 760px;
}

.area-hero h1 {
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.92;
}

.area-hero > p:last-child {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.placeholder-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 82px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-medium);
}

.placeholder-card__number {
  color: var(--theme);
  font-family: Georgia, serif;
  font-size: 1.3rem;
}

.placeholder-card h2 {
  margin: 0 0 10px;
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
}

.placeholder-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-page {
  background:
    radial-gradient(circle at 15% -10%, rgba(185, 147, 74, 0.18), transparent 36rem),
    var(--paper);
}

.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 76px 0 110px;
}

.admin-heading {
  max-width: 700px;
  margin-bottom: 42px;
}

.admin-heading h1 {
  font-size: clamp(2.7rem, 7vw, 5rem);
}

.admin-heading > p:last-child {
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.password-card,
.admin-security {
  padding: clamp(26px, 4vw, 38px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-medium);
  box-shadow: 0 16px 48px rgba(30, 33, 29, 0.08);
}

.password-card--cattle {
  --theme: #315c45;
}

.password-card--oil {
  --theme: #252d31;
}

.password-card--admin {
  --theme: #8d6a2e;
}

.password-card h2,
.admin-security h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.75rem;
  font-weight: 500;
}

.updated-label {
  margin: 9px 0 24px;
  color: var(--muted);
  font-size: 0.78rem;
}

.compact-form {
  gap: 8px;
}

.admin-security {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 50px;
  margin-top: 20px;
  align-items: start;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
  padding: 6px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
}

.admin-tab {
  display: inline-flex;
  min-height: 44px;
  gap: 10px;
  align-items: center;
  padding: 0 17px;
  color: var(--muted);
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.admin-tab strong {
  min-width: 22px;
  padding: 3px 6px;
  color: var(--gold-deep);
  background: rgba(185, 147, 74, 0.12);
  border-radius: 999px;
  font-size: 0.68rem;
  text-align: center;
}

.admin-tab.is-active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 5px 18px rgba(30, 33, 29, 0.08);
}

.admin-panel {
  padding: clamp(26px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-medium);
  box-shadow: 0 16px 48px rgba(30, 33, 29, 0.07);
}

.section-heading {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 500;
}

.section-heading > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.section-heading--list {
  margin-top: 48px;
}

.account-create-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: #4d554f;
  font-size: 0.72rem;
  font-weight: 750;
}

.form-field input,
.form-field select {
  width: 100%;
  height: 46px;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d5d5cf;
  border-radius: 9px;
  outline: none;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(185, 147, 74, 0.12);
}

.account-create-form .primary-button,
.inline-admin-form .secondary-button {
  height: 46px;
  min-height: 46px;
  margin: 0;
  white-space: nowrap;
}

.account-list {
  display: grid;
  gap: 14px;
}

.account-card {
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-left: 4px solid #3a7b59;
  border-radius: 13px;
}

.account-card.is-inactive {
  border-left-color: #a8aaa5;
  opacity: 0.78;
}

.account-card__header,
.account-title-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.account-title-row {
  justify-content: flex-start;
}

.account-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.account-card__header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.status-badge,
.area-pill,
.rank-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 750;
  white-space: nowrap;
}

.rank-badge {
  color: var(--gold-deep);
  background: rgba(185, 147, 74, 0.12);
}

.status-badge--active {
  color: var(--success);
  background: var(--success-bg);
}

.status-badge--inactive {
  color: #696d68;
  background: #ececea;
}

.status-button {
  min-height: 38px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 750;
}

.status-button--disable {
  color: var(--danger);
}

.status-button--enable {
  color: var(--success);
}

.status-button--protected,
.status-button:disabled {
  color: #777a76;
  background: #ededeb;
  cursor: not-allowed;
}

.account-card__forms {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(140px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
}

.inline-admin-form--password {
  grid-template-columns: 1fr 1fr auto;
}

.protected-account-fields {
  padding: 14px;
  background: #f0f0ed;
  border: 1px solid #deded9;
  border-radius: 11px;
}

.protected-account-fields input:disabled,
.protected-account-fields button:disabled {
  color: #777a76;
  background: #e7e7e3;
  border-color: #d6d6d0;
  opacity: 1;
  cursor: not-allowed;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 52px 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(23, 32, 28, 0.2);
  border-radius: var(--radius-medium);
  text-align: center;
}

.empty-state span {
  color: rgba(185, 147, 74, 0.5);
  font-family: Georgia, serif;
  font-size: 2.3rem;
}

.empty-state strong {
  margin-top: 10px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.empty-state p {
  max-width: 470px;
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

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

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  white-space: nowrap;
}

.audit-table th,
.audit-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.audit-table th {
  color: var(--muted);
  background: #f6f4ee;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audit-table tbody tr:last-child td {
  border-bottom: 0;
}

.audit-table code {
  color: #4b524d;
  font-size: 0.7rem;
}

.device-cell {
  max-width: 240px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.area-pill--cattle {
  color: #315c45;
  background: #e7eee9;
}

.area-pill--oil {
  color: #343b3e;
  background: #e7e9e9;
}

.area-pill--admin {
  color: var(--gold-deep);
  background: #f4eddf;
}

.stock-log-panel {
  margin-top: 20px;
}

.stock-table-wrap {
  max-height: 680px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stock-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.stock-admin-table th,
.stock-admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.stock-admin-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: var(--muted);
  background: #f6f4ee;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.target-form {
  display: grid;
  grid-template-columns: minmax(95px, 150px) auto;
  gap: 8px;
  justify-content: start;
  align-items: center;
}

.target-form input {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d5d5cf;
  border-radius: 8px;
}

.target-form .secondary-button {
  min-height: 38px;
  height: 38px;
  margin: 0;
  padding: 0 13px;
}

.stock-log-table td {
  vertical-align: top;
}

.stock-value {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 7px;
  font-weight: 750;
}

.stock-value--before {
  color: #7d4b42;
  background: #f7ebe7;
}

.stock-value--after {
  color: var(--success);
  background: var(--success-bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.maintenance-page {
  background:
    radial-gradient(circle at 50% 0%, rgba(185, 147, 74, 0.2), transparent 32rem),
    var(--paper);
}

.maintenance-panel {
  text-align: center;
}

.maintenance-panel .access-panel__mark {
  margin-right: auto;
  margin-left: auto;
}

.maintenance-panel .panel-copy {
  margin-right: auto;
  margin-left: auto;
}

.maintenance-hint {
  margin: -16px 0 22px;
  color: var(--gold-deep);
  font-size: 0.78rem;
  font-weight: 750;
}

.admin-system-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.system-card {
  padding: clamp(24px, 4vw, 34px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-left: 4px solid var(--success);
  border-radius: var(--radius-medium);
  box-shadow: 0 16px 48px rgba(30, 33, 29, 0.07);
}

.system-card--active,
.system-card--danger {
  border-left-color: var(--danger);
}

.system-card__heading {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: flex-start;
}

.system-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.75rem;
  font-weight: 500;
}

.system-card > p {
  min-height: 66px;
  margin: 18px 0 20px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.system-status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
}

.system-status--online {
  color: var(--success);
  background: var(--success-bg);
}

.system-status--locked,
.system-status--danger {
  color: var(--danger);
  background: var(--danger-bg);
}

.system-action-form {
  display: grid;
  gap: 12px;
}

.system-action-form .primary-button,
.system-action-form .secondary-button,
.system-action-form .danger-button {
  width: 100%;
  margin: 0;
}

.control-check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px;
  background: rgba(245, 242, 235, 0.8);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.control-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--success);
}

.control-check span {
  display: grid;
  gap: 3px;
  font-size: 0.78rem;
}

.control-check small {
  color: var(--muted);
  line-height: 1.45;
}

.danger-button {
  display: inline-flex;
  min-height: 50px;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  color: #fff;
  background: var(--danger);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
}

.permission-panel {
  margin-top: 20px;
}

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

.permission-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.permission-table th,
.permission-table td {
  padding: 13px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.permission-table th:last-child,
.permission-table td:last-child {
  border-right: 0;
}

.permission-table tr:last-child th,
.permission-table tr:last-child td {
  border-bottom: 0;
}

.permission-table thead th {
  color: var(--muted);
  background: #f6f4ee;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.permission-table tbody th {
  min-width: 160px;
  text-align: left;
}

.permission-table tbody th strong,
.permission-table tbody th small {
  display: block;
}

.permission-table tbody th small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 500;
}

.permission-row--protected {
  background: rgba(185, 147, 74, 0.08);
}

.permission-check {
  position: relative;
  display: inline-grid;
  width: 30px;
  height: 30px;
  cursor: pointer;
  place-items: center;
}

.permission-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.permission-check > span[aria-hidden="true"] {
  display: grid;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 1px solid #c9cbc6;
  border-radius: 7px;
  place-items: center;
  transition: 120ms ease;
}

.permission-check input:checked + span[aria-hidden="true"] {
  background: var(--success);
  border-color: var(--success);
}

.permission-check input:checked + span[aria-hidden="true"]::after {
  width: 8px;
  height: 4px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.permission-check input:focus-visible + span[aria-hidden="true"] {
  box-shadow: 0 0 0 4px rgba(32, 106, 72, 0.14);
}

.permission-check input:disabled + span[aria-hidden="true"] {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  opacity: 0.75;
}

.permission-actions {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.permission-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.permission-actions .primary-button {
  margin: 0;
}

@media (max-width: 1040px) {
  .landing-header {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .landing-intro {
    max-width: 620px;
  }

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

  .account-create-form .primary-button {
    grid-column: 1 / -1;
  }

  .account-card__forms {
    grid-template-columns: 1fr;
  }

  .admin-system-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .simple-landing-shell {
    width: min(100% - 28px, 920px);
    align-content: start;
    padding-top: 58px;
  }

  .simple-landing-header {
    margin-bottom: 30px;
  }

  .simple-brand-grid {
    grid-template-columns: 1fr;
  }

  .simple-brand-card {
    min-height: 180px;
    padding: 25px;
  }

  .landing-shell {
    width: min(100% - 28px, 1160px);
    padding-bottom: 100px;
  }

  .landing-nav {
    min-height: 76px;
  }

  .landing-header {
    padding: 56px 0 36px;
  }

  .landing-header h1 {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .brand-grid,
  .admin-grid,
  .admin-security {
    grid-template-columns: 1fr;
  }

  .brand-card {
    min-height: 320px;
    padding: 26px;
  }

  .brand-card__title {
    font-size: 2.35rem;
  }

  .landing-footer {
    flex-wrap: wrap;
  }

  .area-nav {
    min-height: 70px;
  }

  .area-nav__actions {
    gap: 2px;
  }

  .text-link {
    display: none;
  }

  .area-shell {
    padding: 72px 0;
  }

  .placeholder-card {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 56px;
  }

  .admin-security {
    gap: 16px;
  }

  .section-heading,
  .account-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-create-form,
  .inline-admin-form,
  .inline-admin-form--password {
    grid-template-columns: 1fr;
  }

  .account-create-form .primary-button {
    grid-column: auto;
  }

  .account-card {
    padding: 20px;
  }

  .account-card__forms {
    min-width: 0;
  }

  .admin-tabs {
    margin-right: -6px;
    margin-left: -6px;
  }

  .permission-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
