:root {
  --cream: #f7ead9;
  --cream-strong: #f1dfc6;
  --paper: #fffaf4;
  --surface: #fffdf9;
  --line: #e2caa9;
  --line-soft: #eadbc7;
  --gold: #a87322;
  --gold-dark: #7b5118;
  --login-action: #946725;
  --login-title: #7e5316;
  --login-panel-bg: #fcf8f3;
  --font-body: "Google Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text: #33281d;
  --muted: #7d7368;
  --soft-muted: #aaa196;
  --danger: #9b2f2f;
  --success: #416d47;
  --sidebar: #272018;
  --app-bg: #f7efe5;
  --app-bg-strong: #ead6bc;
  --panel-border: rgba(194, 150, 85, 0.32);
  --panel-shadow: 0 18px 46px rgba(72, 49, 23, 0.08);
  --shadow: 0 18px 48px rgba(74, 52, 26, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-body);
  font-optical-sizing: auto;
  background: #fbf7f0;
}

.auto-scale-viewport {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.auto-scale-content {
  width: 100vw;
  height: 100vh;
  overflow: auto;
  transform-origin: top left;
}

.auto-scale-content[data-scale-active="true"] {
  will-change: transform;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-body {
  background: var(--cream);
}

.auth-frame {
  min-height: 100%;
  background: var(--cream);
}

.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 650px);
  align-items: center;
  min-height: 100%;
  overflow: hidden;
  padding: 42px calc(var(--app-vw, 1vw) * 7) 42px 42px;
  isolation: isolate;
  background:
    url("../img/login-bg-en-yeni.png") center center / 100% 100% no-repeat,
    var(--cream);
}

.login-story {
  display: grid;
  align-content: start;
  min-height: calc(100% - 84px);
  padding: calc(var(--app-vh, 1vh) * 9.8) 0 18px;
}

.story-copy {
  width: min(630px, calc(var(--app-vw, 1vw) * 56));
  margin-left: calc(var(--app-vw, 1vw) * 12);
  text-align: center;
  transform: translateY(-80px);
}

.story-copy h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 16px 0 18px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.story-copy h1 span {
  white-space: nowrap;
}

.story-diamond {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  opacity: 0.78;
  transform: rotate(45deg);
}

.story-copy p {
  margin: 0 auto;
  max-width: 530px;
  color: #776b60;
  font-size: 19px;
  line-height: 1.68;
}

.ornament-line,
.panel-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #c29655;
}

.ornament-line span,
.panel-divider span {
  width: 104px;
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}

.ornament-line b {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 21px;
  border: 0;
  background: currentColor;
  opacity: 0.96;
  transform: none;
  -webkit-mask: url("../img/cameloticon.svg") center / contain no-repeat;
  mask: url("../img/cameloticon.svg") center / contain no-repeat;
}

.panel-divider b {
  width: 15px;
  height: 16px;
  border: 0;
  background: currentColor;
  opacity: 0.92;
  transform: none;
  -webkit-mask: url("../img/cameloticon.svg") center / contain no-repeat;
  mask: url("../img/cameloticon.svg") center / contain no-repeat;
}

.ornament-line.small {
  margin-top: 24px;
}

.ornament-line.small b {
  width: 18px;
  height: 19px;
}

.ornament-line.small span {
  width: 72px;
}

.login-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 540px);
  min-height: 790px;
  margin-left: auto;
  padding: 38px 42px 32px;
  text-align: center;
  border: 1px solid rgba(194, 150, 85, 0.3);
  border-radius: 24px;
  background: var(--login-panel-bg);
  box-shadow:
    0 34px 86px rgba(92, 61, 25, 0.22),
    0 12px 28px rgba(92, 61, 25, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  transform: translateX(-70px);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(194, 150, 85, 0.3);
  border-radius: 16px;
  pointer-events: none;
}

.login-logo {
  width: min(197px, 48%);
  max-height: 122px;
  object-fit: contain;
  align-self: center;
  margin-bottom: -4px;
  transform: translateY(-46px);
}

.login-panel > .panel-divider {
  margin: 0 0 12px;
  opacity: 0.74;
}

.login-panel h2 {
  margin: 0 0 11px;
  color: var(--login-title);
  font-family: var(--font-display);
  font-size: clamp(38px, calc(var(--app-vw, 1vw) * 3.2), 54px);
  font-weight: 500;
  line-height: 1;
  transform: translateY(-10px);
}

.login-panel > p {
  margin: 0 0 22px;
  color: #736b62;
  font-size: 15px;
}

.login-form {
  display: grid;
  gap: 13px;
}

.login-form .field input {
  min-height: 54px;
}

.field {
  display: grid;
  gap: 7px;
  text-align: left;
}

.field > span,
.fields label > span,
.filter-form label > span {
  color: #766a5f;
  font-size: 13px;
  font-weight: 700;
}

.field.with-icon {
  position: relative;
}

.field.with-icon > span:not(.field-icon) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.field.with-icon > svg,
.field.with-icon > .field-icon {
  position: absolute;
  left: 20px;
  bottom: 17px;
  color: var(--gold-dark);
}

.login-icon-mask {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.field-icon {
  opacity: 0.92;
}

.field input,
.fields input,
.fields select,
.fields textarea,
.filter-form input,
.filter-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 252, 247, 0.72);
  color: var(--text);
  padding: 0 16px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field.with-icon input {
  padding-left: 54px;
}

.fields textarea {
  min-height: 96px;
  padding: 14px 16px;
  resize: vertical;
}

.field input:focus,
.fields input:focus,
.fields select:focus,
.fields textarea:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 115, 34, 0.12);
  background: #fff;
}

.password-field input {
  padding-right: 54px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--gold-dark);
  background: transparent;
}

.login-form .password-toggle {
  bottom: 9px;
}

.button-icon {
  width: 21px;
  height: 21px;
}

.login-row,
.check-line {
  display: flex;
  align-items: center;
}

.login-row {
  justify-content: space-between;
  margin: 3px 0 10px;
  color: var(--login-action);
  font-size: 14px;
}

.check-line {
  gap: 10px;
  color: var(--login-action);
}

.check-line input,
.switch input,
.check-card input,
.matrix-check input {
  accent-color: var(--gold);
}

.gold-button,
.outline-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.gold-button,
.button {
  color: #fff;
  background: var(--login-action);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.gold-button {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
}

.outline-button,
.button.secondary,
.button.ghost {
  color: var(--gold-dark);
  border-color: var(--line);
  background: rgba(255, 252, 247, 0.72);
}

.outline-button {
  width: 100%;
  margin-top: 10px;
}

.login-panel .gold-button,
.login-panel .outline-button {
  font-weight: 700;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
}

.app-frame .button {
  min-height: 42px;
  border-color: rgba(148, 103, 37, 0.18);
  background: var(--login-action);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.app-frame .button.secondary,
.app-frame .button.ghost {
  color: var(--gold-dark);
  border-color: rgba(194, 150, 85, 0.28);
  background: rgba(255, 253, 249, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.app-frame .text-link:hover,
.app-frame .icon-button:hover,
.app-frame .profile-pill:hover {
  border-color: rgba(194, 150, 85, 0.48);
  background-color: rgba(255, 248, 239, 0.94);
}

.app-frame .button:hover {
  background-color: #845a1e;
}

.app-frame .button.secondary:hover,
.app-frame .button.ghost:hover {
  background-color: rgba(255, 248, 239, 0.94);
}

.gold-button:active,
.outline-button:active,
.button:active {
  transform: translateY(1px) scale(0.99);
}

.login-foot {
  margin-top: 24px;
  color: #81776f;
  font-size: 13px;
  line-height: 1.5;
}

.login-foot .panel-divider {
  margin-bottom: 12px;
  opacity: 0.68;
}

.login-foot .panel-divider span {
  width: 80px;
}

.login-flashes {
  margin-bottom: 14px;
}

.app-body {
  background:
    linear-gradient(180deg, rgba(252, 248, 243, 0.9) 0%, rgba(243, 231, 216, 0.92) 100%),
    var(--app-bg);
}

.app-frame {
  position: relative;
  display: grid;
  grid-template-columns: 302px minmax(0, 1fr);
  min-height: 100%;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(124, 82, 24, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(252, 248, 243, 0.96) 0%, rgba(242, 230, 215, 0.92) 100%),
    var(--app-bg);
  background-size: 88px 100%, auto, auto;
}

.app-frame::before {
  content: "";
  position: absolute;
  right: 42px;
  bottom: 32px;
  width: 360px;
  height: 382px;
  color: rgba(126, 83, 22, 0.035);
  background: currentColor;
  pointer-events: none;
  -webkit-mask: url("../img/cameloticon.svg") center / contain no-repeat;
  mask: url("../img/cameloticon.svg") center / contain no-repeat;
  z-index: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  height: 100%;
  padding: 22px 18px;
  overflow-y: auto;
  color: #f6ead8;
  background:
    linear-gradient(180deg, rgba(194, 150, 85, 0.1), transparent 34%),
    linear-gradient(180deg, #32261a 0%, #20170f 100%);
  border-right: 1px solid rgba(175, 135, 76, 0.32);
  box-shadow: 16px 0 54px rgba(59, 41, 21, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 10px 18px;
  border: 1px solid rgba(218, 178, 115, 0.18);
  border-radius: 8px;
  background: rgba(255, 246, 234, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand img {
  width: 68px;
  height: 46px;
  object-fit: contain;
  background: rgba(255, 249, 241, 0.96);
  border-radius: 8px;
}

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

.brand strong {
  color: #fff7ea;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand small {
  color: #d4b98d;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #e9d9c2;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  color: #fff;
  border-color: rgba(218, 178, 115, 0.28);
  background: rgba(171, 120, 42, 0.2);
  transform: translateX(2px);
}

.nav-mark {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(218, 178, 115, 0.46);
  border-radius: 7px;
  color: #e7c58f;
  background: rgba(255, 244, 225, 0.04);
}

.nav-mark::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.sidebar-nav a:hover .nav-mark,
.sidebar-nav a.is-active .nav-mark {
  color: #fff3d4;
  border-color: rgba(236, 201, 145, 0.68);
  background: rgba(194, 150, 85, 0.16);
}

.sidebar-foot {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(218, 178, 115, 0.18);
  border-radius: 8px;
  color: #f3dfbd;
  background: rgba(255, 246, 234, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-foot-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(218, 178, 115, 0.28);
  border-radius: 8px;
  color: #e7c58f;
  background: rgba(255, 244, 225, 0.05);
}

.sidebar-foot-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--foot-icon) center / contain no-repeat;
  mask: var(--foot-icon) center / contain no-repeat;
}

.sidebar-foot strong,
.sidebar-foot small {
  display: block;
}

.sidebar-foot strong {
  color: #fff7ea;
  font-size: 13px;
  font-weight: 900;
}

.sidebar-foot small {
  margin-top: 4px;
  color: #d4b98d;
  font-size: 12px;
  line-height: 1.35;
}

.shell {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 104px;
  margin: 18px 24px 0;
  padding: 18px 22px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(252, 248, 243, 0.88);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(194, 150, 85, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(194, 150, 85, 0.48));
  pointer-events: none;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.page-mark {
  display: grid;
  place-items: center;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(194, 150, 85, 0.42);
  border-radius: 8px;
  color: var(--login-action);
  background: linear-gradient(180deg, #fffdf9, #f5eadb);
}

.page-mark::before {
  content: "";
  width: 25px;
  height: 25px;
  background: currentColor;
  -webkit-mask: var(--page-icon) center / contain no-repeat;
  mask: var(--page-icon) center / contain no-repeat;
}

.topbar h1,
.panel h2,
.toolbar h2 {
  margin: 0;
  color: #2f251b;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 13px 6px 6px;
  border: 1px solid rgba(194, 150, 85, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.92);
}

.profile-pill span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: #fff;
  background: var(--login-action);
  font-weight: 900;
}

.profile-pill strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(194, 150, 85, 0.28);
  border-radius: 8px;
  color: var(--gold-dark);
  background: rgba(255, 253, 249, 0.92);
}

[hidden] {
  display: none !important;
}

.app-frame {
  grid-template-columns: 302px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(194, 150, 85, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(253, 250, 245, 0.98) 0%, rgba(246, 237, 225, 0.92) 100%),
    var(--app-bg);
}

.sidebar {
  gap: 18px;
  padding: 20px 22px;
  color: #3f3429;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(252, 248, 243, 0.94)),
    var(--app-bg);
  border-right: 1px solid rgba(194, 150, 85, 0.22);
  box-shadow: 18px 0 44px rgba(75, 53, 27, 0.08);
}

.brand {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 14px 0 18px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.brand img {
  width: 142px;
  height: 92px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
}

.brand span {
  display: none;
}

.sidebar-nav {
  gap: 8px;
  padding-top: 2px;
}

.sidebar-nav a {
  min-height: 50px;
  padding: 10px 14px;
  color: #46382a;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  color: #fff;
  border-color: rgba(148, 103, 37, 0.38);
  background: linear-gradient(180deg, #b9822f 0%, #946725 100%);
  box-shadow: 0 12px 22px rgba(126, 83, 22, 0.18);
  transform: translateX(0);
}

.nav-mark {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  color: #a8792f;
  border-color: transparent;
  background: transparent;
}

.sidebar-nav a:hover .nav-mark,
.sidebar-nav a.is-active .nav-mark {
  color: #fff5df;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-foot {
  color: #6b5437;
  border-color: rgba(194, 150, 85, 0.22);
  background: rgba(255, 253, 249, 0.68);
}

.sidebar-foot strong {
  color: #3b2d1e;
}

.sidebar-foot small {
  color: #7c5a27;
}

.topbar {
  min-height: 92px;
  margin: 0;
  padding: 18px 28px;
  border: 0;
  border-bottom: 1px solid rgba(194, 150, 85, 0.2);
  border-radius: 0;
  background: rgba(253, 250, 245, 0.9);
  box-shadow: 0 12px 34px rgba(75, 53, 27, 0.07);
}

.topbar::before,
.topbar::after,
.topbar-title {
  display: none;
}

.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
  flex: 1 1 auto;
}

.menu-button,
.notification-pill {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #5b4937;
  background: transparent;
}

.menu-button svg,
.notification-pill span::before,
.date-pill span::before {
  width: 20px;
  height: 20px;
}

.menu-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 540px;
  max-width: 620px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(194, 150, 85, 0.26);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.topbar-search-icon::before,
.date-pill span::before,
.notification-pill span::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--search-icon) center / contain no-repeat;
  mask: var(--search-icon) center / contain no-repeat;
}

.date-pill span::before,
.notification-pill span::before {
  -webkit-mask: var(--utility-icon) center / contain no-repeat;
  mask: var(--utility-icon) center / contain no-repeat;
}

.topbar-search-icon {
  color: #6c5a48;
}

.topbar-search input {
  flex: 1 1 auto;
  min-width: 160px;
  border: 0;
  outline: 0;
  color: #413326;
  background: transparent;
  font: inherit;
}

.topbar-search input::placeholder {
  color: #8d7d6b;
}

.topbar-search kbd {
  padding: 3px 7px;
  border: 1px solid rgba(194, 150, 85, 0.26);
  border-radius: 5px;
  color: #7d6b57;
  background: rgba(252, 248, 243, 0.9);
  font-size: 12px;
  font-family: var(--font-body);
}

.current-module {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.current-module .page-mark {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

.current-module .page-mark::before {
  width: 21px;
  height: 21px;
}

.current-module small,
.profile-pill small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.current-module strong {
  display: block;
  color: #33271b;
  font-size: 13px;
  font-weight: 900;
}

.topbar-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 12px;
}

.date-pill,
.farm-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.82);
}

.date-pill span,
.notification-pill span {
  color: #6c4b1e;
}

.date-pill strong {
  color: #3f3429;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.farm-status {
  display: grid;
  gap: 4px;
  min-width: 178px;
}

.farm-status small {
  color: #8b735a;
  font-size: 12px;
  font-weight: 800;
}

.farm-status strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #3f3429;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.farm-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2f9c5b;
  box-shadow: 0 0 0 3px rgba(47, 156, 91, 0.12);
}

.notification-pill {
  color: #4e3c2c;
  border-color: transparent;
  background: transparent;
}

.notification-pill b {
  position: absolute;
  right: 2px;
  top: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #946725;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.profile-pill {
  display: grid;
  grid-template-columns: 44px minmax(96px, max-content);
  grid-template-rows: auto auto;
  column-gap: 10px;
  min-height: 54px;
  padding: 5px 12px 5px 5px;
}

.profile-pill span {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(180deg, #b9822f, #946725);
}

.profile-pill strong {
  max-width: 180px;
  color: #30261d;
  font-size: 13px;
  line-height: 1.25;
}

.profile-pill small {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-search {
  flex-basis: 620px;
  max-width: 640px;
}

.current-module {
  display: none;
}

.sidebar-foot {
  display: block;
  min-height: 0;
  margin-top: auto;
  padding: 15px 0 0;
  border: 0;
  border-top: 1px solid rgba(194, 150, 85, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.sidebar-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  color: #6d5438;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.sidebar-collapse:hover {
  color: #946725;
  background: rgba(194, 150, 85, 0.08);
}

.sidebar-foot-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 0;
  color: currentColor;
  background: transparent;
}

.sidebar-foot-icon::before {
  width: 18px;
  height: 18px;
}

.main-content {
  display: grid;
  gap: 22px;
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 24px 30px 50px;
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash {
  padding: 13px 15px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: var(--panel-shadow);
  font-weight: 700;
}

.flash-success {
  color: var(--success);
  border-color: rgba(65, 109, 71, 0.28);
  background: #f0f7ef;
}

.flash-error {
  color: var(--danger);
  border-color: rgba(155, 47, 47, 0.25);
  background: #fff0ef;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
  align-items: stretch;
  gap: 22px;
  min-height: 238px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(252, 248, 243, 0.96) 0%, rgba(252, 248, 243, 0.88) 54%, rgba(241, 226, 205, 0.82) 100%),
    rgba(252, 248, 243, 0.9);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(194, 150, 85, 0.17);
  border-radius: 6px;
  pointer-events: none;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -38px;
  width: 210px;
  height: 224px;
  color: rgba(126, 83, 22, 0.04);
  background: currentColor;
  pointer-events: none;
  -webkit-mask: url("../img/cameloticon.svg") center / contain no-repeat;
  mask: url("../img/cameloticon.svg") center / contain no-repeat;
}

.dashboard-hero-main,
.dashboard-status-grid {
  position: relative;
  z-index: 1;
}

.dashboard-hero-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  max-width: 760px;
}

.dashboard-hero-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(194, 150, 85, 0.36);
  border-radius: 8px;
  color: var(--login-action);
  background: linear-gradient(180deg, #fffdf9, #f3e2c8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 26px rgba(126, 83, 22, 0.08);
}

.dashboard-hero-mark::before {
  content: "";
  width: 36px;
  height: 36px;
  background: currentColor;
  -webkit-mask: var(--hero-icon) center / contain no-repeat;
  mask: var(--hero-icon) center / contain no-repeat;
}

.dashboard-hero h2 {
  margin: 0;
  max-width: 680px;
  color: var(--login-title);
  font-family: var(--font-display);
  font-size: clamp(34px, 3.2vw, 52px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.dashboard-hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 14px 0 0;
  color: #6d5844;
  font-size: 15px;
  line-height: 1.7;
}

.dashboard-status-grid {
  display: grid;
  gap: 10px;
}

.dashboard-status-item {
  position: relative;
  min-height: 68px;
  padding: 14px 16px 14px 56px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.dashboard-status-item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 18px;
  width: 23px;
  height: 23px;
  color: rgba(148, 103, 37, 0.74);
  background: currentColor;
  -webkit-mask: var(--status-icon) center / contain no-repeat;
  mask: var(--status-icon) center / contain no-repeat;
}

.dashboard-status-item span,
.dashboard-status-item strong,
.dashboard-status-item small {
  display: block;
}

.dashboard-status-item span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-status-item strong {
  margin-top: 3px;
  overflow: hidden;
  color: #2f251b;
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-status-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.metric,
.panel {
  position: relative;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: rgba(252, 248, 243, 0.88);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.metric {
  min-height: 118px;
  padding: 18px 16px 16px 76px;
  overflow: hidden;
  background:
    radial-gradient(circle at 40px 43px, rgba(194, 150, 85, 0.16) 0 31px, transparent 32px),
    rgba(252, 248, 243, 0.88);
}

.metric::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(194, 150, 85, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.metric::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 21px;
  width: 38px;
  height: 38px;
  color: rgba(148, 103, 37, 0.72);
  background: currentColor;
  -webkit-mask: var(--metric-icon) center / contain no-repeat;
  mask: var(--metric-icon) center / contain no-repeat;
}

.metric span {
  color: #7c5a27;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 7px 0 4px;
  font-variant-numeric: tabular-nums;
  color: var(--login-title);
  font-size: 30px;
  line-height: 1;
}

.metric p,
.panel p,
.lead {
  color: var(--muted);
  line-height: 1.6;
}

.metric p {
  margin: 0;
  font-size: 12px;
}

.panel {
  padding: 22px;
}

.panel-head,
.toolbar,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.panel-head {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(194, 150, 85, 0.2);
}

.panel-head h2,
.toolbar h2 {
  font-size: 22px;
}

.toolbar {
  min-height: 58px;
  padding: 16px 18px;
  border: 1px solid rgba(194, 150, 85, 0.26);
  border-radius: 8px;
  background: rgba(252, 248, 243, 0.82);
  box-shadow: var(--panel-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.toolbar > div,
.toolbar .filter-form {
  min-width: 0;
}

.toolbar .eyebrow {
  margin-bottom: 4px;
}

.filter-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-form label {
  display: grid;
  gap: 6px;
}

.filter-form input,
.filter-form select {
  min-width: 220px;
  background: rgba(255, 253, 249, 0.92);
}

.form-actions {
  min-height: 66px;
  padding: 14px 16px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  background: rgba(252, 248, 243, 0.78);
  box-shadow: var(--panel-shadow);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.split-grid.compact {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.erp-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(360px, 0.68fr);
  gap: 18px;
}

.panel-filter {
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid rgba(194, 150, 85, 0.26);
  border-radius: 8px;
  color: #6f522d;
  background: rgba(255, 253, 249, 0.78);
  font-size: 12px;
  font-weight: 850;
}

.permission-coverage {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 166px;
  padding: 10px 0 20px;
}

.coverage-ring {
  display: grid;
  place-items: center;
  align-content: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(252, 248, 243, 0.98) 0 55%, transparent 56%),
    conic-gradient(#946725 0 var(--coverage), rgba(230, 206, 172, 0.82) var(--coverage) 100%);
  box-shadow: inset 0 0 0 1px rgba(194, 150, 85, 0.18), 0 16px 28px rgba(126, 83, 22, 0.08);
}

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

.coverage-ring strong {
  color: var(--login-title);
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.coverage-ring small {
  margin-top: 5px;
  color: #806a50;
  font-size: 12px;
  font-weight: 800;
}

.coverage-copy strong {
  color: #30261d;
  font-size: 18px;
  font-weight: 900;
}

.coverage-copy p {
  margin: 8px 0 0;
  max-width: 620px;
  font-size: 13px;
}

.permission-bars {
  display: grid;
  gap: 13px;
}

.permission-bars article {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(90px, 0.35fr) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
}

.permission-bars span,
.permission-bars strong {
  color: #4b3928;
  font-size: 13px;
  font-weight: 850;
}

.permission-bars strong {
  color: #6f522d;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.permission-bars i {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(230, 206, 172, 0.64);
}

.permission-bars i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  border-radius: inherit;
  background: linear-gradient(90deg, #946725, #c29655);
}

.control-list {
  display: grid;
  gap: 0;
}

.control-list article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.58);
}

.control-list article:last-child {
  border-bottom: 0;
}

.control-list time {
  color: #6d5844;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.control-list strong,
.control-list small {
  display: block;
}

.control-list strong {
  color: #30261d;
  font-size: 13px;
  font-weight: 900;
}

.control-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.control-list span {
  min-width: 86px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.control-list .done {
  color: #2d7d49;
  background: rgba(47, 156, 91, 0.12);
}

.control-list .running {
  color: #946725;
  background: rgba(194, 150, 85, 0.18);
}

.control-list .waiting {
  color: #42678f;
  background: rgba(66, 103, 143, 0.12);
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-actions-grid a {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 94px;
  padding: 14px 10px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  color: #4a3929;
  background: rgba(255, 253, 249, 0.74);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.quick-actions-grid a::before {
  content: "";
  width: 30px;
  height: 30px;
  color: #a8792f;
  background: currentColor;
  -webkit-mask: var(--quick-icon) center / contain no-repeat;
  mask: var(--quick-icon) center / contain no-repeat;
}

.quick-actions-grid a:hover {
  border-color: rgba(148, 103, 37, 0.4);
  box-shadow: 0 12px 22px rgba(126, 83, 22, 0.1);
  transform: translateY(-1px);
}

.readiness-list {
  display: grid;
  gap: 13px;
}

.readiness-list article {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(194, 150, 85, 0.2);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.68);
}

.readiness-list span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #b9822f, #946725);
  font-size: 20px;
  font-weight: 900;
}

.readiness-list strong {
  display: block;
  color: #33271b;
  font-size: 14px;
  font-weight: 900;
}

.readiness-list p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.module-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(194, 150, 85, 0.18);
}

.module-chip-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(194, 150, 85, 0.2);
  border-radius: 8px;
  color: #4b3928;
  background: rgba(255, 253, 249, 0.66);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-chip-grid span::before {
  content: "";
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #a8792f;
  background: currentColor;
  -webkit-mask: var(--chip-icon) center / contain no-repeat;
  mask: var(--chip-icon) center / contain no-repeat;
}

.app-corner {
  position: absolute;
  z-index: 6;
  width: 86px;
  height: 86px;
  pointer-events: none;
  color: rgba(194, 150, 85, 0.62);
}

.app-corner::before {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  background: currentColor;
  -webkit-mask: url("../img/cameloticon.svg") center / contain no-repeat;
  mask: url("../img/cameloticon.svg") center / contain no-repeat;
}

.app-corner::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-color: currentColor;
  opacity: 0.74;
}

.app-corner-tl {
  left: 8px;
  top: 8px;
}

.app-corner-tl::before {
  left: 0;
  top: 0;
}

.app-corner-tl::after {
  border-top: 1px solid;
  border-left: 1px solid;
}

.app-corner-tr {
  right: 8px;
  top: 8px;
}

.app-corner-tr::before {
  right: 0;
  top: 0;
  transform: scaleX(-1);
}

.app-corner-tr::after {
  border-top: 1px solid;
  border-right: 1px solid;
}

.app-corner-bl {
  left: 8px;
  bottom: 8px;
}

.app-corner-bl::before {
  left: 0;
  bottom: 0;
  transform: scaleY(-1);
}

.app-corner-bl::after {
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.app-corner-br {
  right: 8px;
  bottom: 8px;
}

.app-corner-br::before {
  right: 0;
  bottom: 0;
  transform: scale(-1);
}

.app-corner-br::after {
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.app-footer {
  padding: 0 30px 14px;
  color: #8b745b;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.table-wrap,
.permission-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(194, 150, 85, 0.26);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.82);
}

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

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.64);
  text-align: left;
  vertical-align: top;
}

thead th {
  color: var(--gold-dark);
  background: rgba(248, 234, 214, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.16s ease;
}

tbody tr:hover {
  background: rgba(255, 247, 237, 0.72);
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.actions-col {
  width: 180px;
}

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

.row-actions form {
  display: inline;
}

.small-link,
.text-link {
  border: 0;
  padding: 0;
  color: var(--gold-dark);
  background: transparent;
  font-weight: 800;
  font-size: 13px;
}

.text-link {
  min-height: 34px;
  padding: 8px 11px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.72);
}

.small-link.danger {
  color: var(--danger);
}

.small-link:disabled {
  color: var(--soft-muted);
}

.status-badge,
.count-pill,
.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge.active {
  color: var(--success);
  border: 1px solid rgba(65, 109, 71, 0.2);
  background: #eef7ef;
}

.status-badge.passive {
  color: var(--danger);
  border: 1px solid rgba(155, 47, 47, 0.2);
  background: #fff0ef;
}

.count-pill,
.code-pill {
  color: var(--gold-dark);
  border: 1px solid rgba(194, 150, 85, 0.22);
  background: #f8ead6;
}

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

.activity-list article {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(194, 150, 85, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.74);
}

.activity-list article > span {
  align-self: start;
  max-width: 96px;
  overflow-wrap: anywhere;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 900;
}

.activity-list strong {
  display: block;
  font-size: 14px;
}

.activity-list p {
  margin: 4px 0 0;
  font-size: 12px;
}

.empty-inline,
.empty-state {
  padding: 26px;
  border: 1px dashed rgba(194, 150, 85, 0.48);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 250, 244, 0.72);
}

.empty-state {
  max-width: 620px;
  margin: calc(var(--app-vh, 1vh) * 8) auto;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 10px;
  color: var(--text);
}

.form-grid {
  display: grid;
  gap: 18px;
}

.fields {
  display: grid;
  gap: 14px;
}

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

.fields.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fields label {
  display: grid;
  gap: 7px;
}

.fields small {
  color: var(--muted);
  font-size: 12px;
}

.app-frame .field input,
.app-frame .fields input,
.app-frame .fields select,
.app-frame .fields textarea,
.app-frame .filter-form input,
.app-frame .filter-form select {
  border-color: rgba(194, 150, 85, 0.3);
  background: rgba(255, 253, 249, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.app-frame .field input:focus,
.app-frame .fields input:focus,
.app-frame .fields select:focus,
.app-frame .fields textarea:focus,
.app-frame .filter-form input:focus,
.app-frame .filter-form select:focus {
  border-color: #c29655;
  box-shadow:
    0 0 0 3px rgba(194, 150, 85, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.span-2 {
  grid-column: span 2;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.role-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.78);
}

.check-card span,
.check-card strong,
.check-card small {
  display: block;
}

.check-card small {
  margin-top: 5px;
  color: var(--muted);
}

.permission-tools {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.permission-table {
  min-width: 1120px;
}

.permission-table th,
.permission-table td {
  text-align: center;
}

.permission-table tbody th {
  width: 280px;
  text-align: left;
  background: rgba(255, 253, 249, 0.82);
}

.module-cell strong,
.module-cell small {
  display: block;
}

.module-cell small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
}

.matrix-check {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.matrix-check input {
  position: absolute;
  opacity: 0;
}

.matrix-check span {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid #d0b48a;
  border-radius: 7px;
  background: #fff;
}

.matrix-check input:checked + span {
  border-color: var(--gold);
  background:
    linear-gradient(135deg, transparent 0 40%, rgba(255, 255, 255, 0.0) 40%),
    var(--gold);
  box-shadow: inset 0 0 0 5px #fff7ed;
}

.matrix-check input:checked + span::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid #fff7ed;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.module-placeholder {
  max-width: 920px;
}

.module-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.module-hero-icon {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(194, 150, 85, 0.34);
  border-radius: 8px;
  color: var(--login-action);
  background: linear-gradient(180deg, #fffdf9, #f4e7d6);
}

.module-hero-icon::before {
  content: "";
  width: 28px;
  height: 28px;
  background: currentColor;
  -webkit-mask: var(--module-icon) center / contain no-repeat;
  mask: var(--module-icon) center / contain no-repeat;
}

.permission-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.permission-chips span {
  min-height: 32px;
  border-radius: 8px;
  padding: 7px 10px;
  font-weight: 800;
  font-size: 13px;
}

.permission-chips .allowed {
  color: var(--success);
  border: 1px solid rgba(65, 109, 71, 0.18);
  background: #edf7ef;
}

.permission-chips .blocked {
  color: var(--soft-muted);
  border: 1px solid rgba(170, 161, 150, 0.28);
  background: #f1ece6;
}

.muted {
  color: var(--muted);
}

.auto-scale-content[data-layout-1180="true"] .login-page {
  grid-template-columns: 1fr;
  padding: 28px;
}

.auto-scale-content[data-layout-1180="true"] .login-story {
  min-height: auto;
  padding: 36px 0;
}

.auto-scale-content[data-layout-1180="true"] .story-copy {
  width: min(100%, 680px);
  margin: 0 auto;
}

.auto-scale-content[data-layout-1180="true"] .login-panel {
  margin: 0 auto;
  transform: none;
}

.auto-scale-content[data-layout-1180="true"] .dashboard-grid,
.auto-scale-content[data-layout-1180="true"] .role-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-scale-content[data-layout-1180="true"] .dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auto-scale-content[data-layout-900="true"].app-frame {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-900="true"].app-frame::before {
  display: none;
}

.auto-scale-content[data-layout-900="true"] .app-corner {
  opacity: 0.42;
}

.auto-scale-content[data-layout-900="true"] .sidebar {
  position: static;
  height: auto;
  max-height: 340px;
}

.auto-scale-content[data-layout-900="true"] .sidebar-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-scale-content[data-layout-900="true"] .dashboard-hero {
  grid-template-columns: 1fr;
  min-height: 0;
}

.auto-scale-content[data-layout-900="true"] .dashboard-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auto-scale-content[data-layout-900="true"] .topbar,
.auto-scale-content[data-layout-900="true"] .toolbar,
.auto-scale-content[data-layout-900="true"] .panel-head,
.auto-scale-content[data-layout-900="true"] .form-actions {
  align-items: flex-start;
  flex-direction: column;
}

.auto-scale-content[data-layout-900="true"] .topbar-actions {
  width: 100%;
  justify-content: space-between;
}

.auto-scale-content[data-layout-900="true"] .topbar-left {
  width: 100%;
  flex-wrap: wrap;
}

.auto-scale-content[data-layout-900="true"] .topbar-search {
  max-width: none;
}

.auto-scale-content[data-layout-900="true"] .date-pill,
.auto-scale-content[data-layout-900="true"] .farm-status {
  flex: 1 1 220px;
}

.auto-scale-content[data-layout-900="true"] .split-grid,
.auto-scale-content[data-layout-900="true"] .split-grid.compact,
.auto-scale-content[data-layout-900="true"] .erp-workbench-grid,
.auto-scale-content[data-layout-900="true"] .dashboard-bottom-grid,
.auto-scale-content[data-layout-900="true"] .fields.two-col,
.auto-scale-content[data-layout-900="true"] .fields.three-col {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-900="true"] .span-2 {
  grid-column: auto;
}

.auto-scale-content[data-layout-640="true"] .login-page {
  padding: 18px;
  background:
    url("../img/login-bg-en-yeni.png") center center / 100% 100% no-repeat,
    var(--cream);
}

.auto-scale-content[data-layout-640="true"] .login-panel {
  padding: 30px 20px;
  border-radius: 18px;
}

.auto-scale-content[data-layout-640="true"] .login-story {
  padding-top: 20px;
}

.auto-scale-content[data-layout-640="true"] .story-copy h1 {
  font-size: 21px;
}

.auto-scale-content[data-layout-640="true"] .dashboard-hero {
  padding: 22px 18px;
}

.auto-scale-content[data-layout-640="true"] .dashboard-hero-main {
  grid-template-columns: 1fr;
  gap: 14px;
}

.auto-scale-content[data-layout-640="true"] .dashboard-hero h2 {
  font-size: 32px;
}

.auto-scale-content[data-layout-640="true"] .dashboard-status-grid,
.auto-scale-content[data-layout-640="true"] .sidebar-nav,
.auto-scale-content[data-layout-640="true"] .dashboard-grid,
.auto-scale-content[data-layout-640="true"] .role-check-grid,
.auto-scale-content[data-layout-640="true"] .quick-actions-grid,
.auto-scale-content[data-layout-640="true"] .module-chip-grid {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-640="true"] .app-corner {
  display: none;
}

.auto-scale-content[data-layout-640="true"] .main-content,
.auto-scale-content[data-layout-640="true"] .topbar {
  padding-left: 16px;
  padding-right: 16px;
}

.auto-scale-content[data-layout-640="true"] .app-footer {
  padding-left: 16px;
  padding-right: 16px;
}

.auto-scale-content[data-layout-640="true"] .permission-coverage,
.auto-scale-content[data-layout-640="true"] .permission-bars article,
.auto-scale-content[data-layout-640="true"] .control-list article {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-640="true"] .coverage-ring {
  margin: 0 auto;
}

.auto-scale-content[data-layout-640="true"] .permission-bars strong {
  text-align: left;
}

.auto-scale-content[data-layout-640="true"] .control-list article {
  gap: 6px;
  padding: 12px 0;
}

.auto-scale-content[data-layout-640="true"] .control-list span {
  width: fit-content;
}

.auto-scale-content[data-layout-640="true"] .topbar-left,
.auto-scale-content[data-layout-640="true"] .topbar-actions {
  gap: 10px;
}

.auto-scale-content[data-layout-640="true"] .topbar-search {
  flex-basis: 100%;
}

.auto-scale-content[data-layout-640="true"] .topbar-search kbd,
.auto-scale-content[data-layout-640="true"] .current-module {
  display: none;
}

.auto-scale-content[data-layout-640="true"] .date-pill,
.auto-scale-content[data-layout-640="true"] .farm-status,
.auto-scale-content[data-layout-640="true"] .profile-pill {
  width: 100%;
}

.auto-scale-content[data-layout-640="true"] .profile-pill strong {
  max-width: 126px;
}

/* 1920px ERP reference pass: keep the desktop dashboard compact and free of visible horizontal overflow. */
.app-body .auto-scale-content {
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 103, 37, 0.28) transparent;
}

.app-body .auto-scale-content::-webkit-scrollbar {
  width: 8px;
  height: 0;
}

.app-body .auto-scale-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 103, 37, 0.22);
}

.app-frame {
  overflow-x: hidden;
}

.sidebar {
  padding: 18px 20px;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.brand {
  min-height: 128px;
}

.brand img {
  width: 132px;
  height: 84px;
}

.sidebar-nav {
  gap: 4px;
}

.sidebar-nav a {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 13px;
}

.nav-mark {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
}

.nav-mark::before {
  width: 16px;
  height: 16px;
}

.topbar {
  min-height: 86px;
  padding: 16px 28px;
}

.main-content {
  gap: 14px;
  width: min(100%, 1510px);
  padding: 18px 24px 24px;
}

.dashboard-grid {
  gap: 14px;
}

.metric {
  min-height: 96px;
  padding: 14px 14px 12px 70px;
  background:
    radial-gradient(circle at 38px 38px, rgba(194, 150, 85, 0.15) 0 28px, transparent 29px),
    rgba(252, 248, 243, 0.88);
}

.metric::after {
  top: 24px;
  left: 21px;
  width: 32px;
  height: 32px;
}

.metric span {
  font-size: 11px;
}

.metric strong {
  margin: 5px 0 3px;
  font-size: 28px;
}

.metric p {
  font-size: 11px;
  line-height: 1.35;
}

.panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.panel-head h2,
.toolbar h2 {
  font-size: 21px;
}

.erp-workbench-grid,
.split-grid,
.dashboard-bottom-grid {
  gap: 14px;
}

.permission-coverage {
  min-height: 132px;
  padding: 4px 0 14px;
}

.coverage-ring {
  width: 112px;
  height: 112px;
}

.coverage-ring strong {
  font-size: 25px;
}

.permission-bars {
  gap: 10px;
}

.control-list article {
  min-height: 56px;
}

.split-grid .table-wrap table {
  min-width: 100%;
}

.split-grid .table-wrap th,
.split-grid .table-wrap td {
  padding: 12px 14px;
}

.activity-list {
  gap: 9px;
}

.activity-list article {
  padding: 12px;
}

.app-footer {
  padding-bottom: 10px;
}

.main-content {
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 18px;
}

.topbar {
  min-height: 82px;
}

.permission-coverage {
  grid-template-columns: 116px minmax(0, 1fr);
  min-height: 112px;
  gap: 18px;
  padding-bottom: 10px;
}

.coverage-ring {
  width: 98px;
  height: 98px;
}

.coverage-ring strong {
  font-size: 23px;
}

.coverage-copy strong {
  font-size: 16px;
}

.coverage-copy p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

.permission-bars {
  gap: 8px;
}

.permission-bars article {
  grid-template-columns: minmax(130px, 0.6fr) minmax(82px, 0.28fr) minmax(160px, 1fr);
}

.control-list article {
  min-height: 50px;
}

.control-list time,
.control-list strong {
  font-size: 12px;
}

.control-list small {
  font-size: 11px;
}

.control-list span {
  min-width: 78px;
  padding: 4px 8px;
  font-size: 10px;
}

.split-grid .panel,
.dashboard-bottom-grid .panel {
  padding: 16px;
}

.split-grid .panel-head,
.dashboard-bottom-grid .panel-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.activity-list article {
  min-height: 52px;
  padding: 9px 10px;
}

.activity-list article > span {
  min-width: 42px;
  padding: 5px 7px;
  font-size: 10px;
}

.activity-list strong {
  font-size: 12px;
}

.activity-list p {
  font-size: 11px;
}

.quick-actions-grid {
  gap: 10px;
}

.quick-actions-grid a {
  min-height: 76px;
  gap: 7px;
  padding: 11px 8px;
  font-size: 12px;
}

.quick-actions-grid a::before {
  width: 25px;
  height: 25px;
}

.readiness-list {
  gap: 9px;
}

.readiness-list article {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 62px;
  gap: 10px;
  padding: 10px;
}

.readiness-list span {
  width: 42px;
  height: 42px;
  font-size: 17px;
}

.readiness-list strong {
  font-size: 13px;
}

.readiness-list p {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.35;
}

.module-chip-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
}

.module-chip-grid span {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 11px;
}

.main-content {
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.dashboard-grid {
  gap: 12px;
}

.metric {
  min-height: 88px;
  padding: 12px 12px 10px 64px;
  background:
    radial-gradient(circle at 35px 35px, rgba(194, 150, 85, 0.15) 0 25px, transparent 26px),
    rgba(252, 248, 243, 0.88);
}

.metric::before,
.panel::before {
  inset: 6px;
}

.metric::after {
  top: 22px;
  left: 20px;
  width: 28px;
  height: 28px;
}

.metric strong {
  font-size: 26px;
}

.metric p {
  max-width: 150px;
}

.panel {
  padding: 14px;
}

.panel-head {
  margin-bottom: 10px;
  padding-bottom: 9px;
}

.panel-head h2,
.toolbar h2 {
  font-size: 20px;
}

.eyebrow {
  margin-bottom: 3px;
  font-size: 10px;
}

.permission-coverage {
  grid-template-columns: 94px minmax(0, 1fr);
  min-height: 92px;
  gap: 14px;
  padding: 0 0 8px;
}

.coverage-ring {
  width: 86px;
  height: 86px;
}

.coverage-ring strong {
  font-size: 21px;
}

.coverage-ring small {
  margin-top: 3px;
  font-size: 10px;
}

.coverage-copy strong {
  font-size: 15px;
}

.coverage-copy p {
  font-size: 11px;
  line-height: 1.4;
}

.permission-bars {
  gap: 7px;
}

.permission-bars article {
  grid-template-columns: minmax(120px, 0.55fr) minmax(74px, 0.24fr) minmax(140px, 1fr);
  gap: 10px;
}

.permission-bars span,
.permission-bars strong {
  font-size: 11px;
}

.permission-bars i {
  height: 8px;
}

.control-list article {
  min-height: 43px;
  gap: 10px;
}

.control-list time,
.control-list strong {
  font-size: 11px;
}

.control-list small {
  margin-top: 1px;
  font-size: 10px;
}

.control-list span {
  min-width: 70px;
  padding: 3px 7px;
}

.split-grid .panel,
.dashboard-bottom-grid .panel {
  padding: 14px;
}

.split-grid .table-wrap th,
.split-grid .table-wrap td {
  padding: 9px 12px;
}

.activity-list {
  gap: 7px;
}

.activity-list article {
  min-height: 44px;
  padding: 8px 9px;
}

.quick-actions-grid a {
  min-height: 66px;
  padding: 8px;
}

.quick-actions-grid a::before {
  width: 22px;
  height: 22px;
}

.main-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 22px;
  padding-right: 22px;
}

.dashboard-bottom-grid .panel {
  padding: 12px;
}

.dashboard-bottom-grid .panel-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.quick-actions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quick-actions-grid a {
  min-height: 58px;
  padding: 7px 8px;
  font-size: 11px;
}

.quick-actions-grid a::before {
  width: 19px;
  height: 19px;
}

.readiness-list article {
  min-height: 54px;
  padding: 8px;
}

.readiness-list span {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.module-chip-grid {
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
}

.module-chip-grid span {
  min-height: 27px;
  padding: 5px 7px;
  font-size: 10px;
}

.app-footer {
  padding-top: 0;
  padding-bottom: 6px;
}

.permission-chart-summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 28px;
  margin-bottom: 6px;
}

.permission-chart-summary strong {
  color: #30261d;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.permission-chart-summary p {
  margin: 0;
  overflow: hidden;
  color: #756554;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-chart {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  min-height: 154px;
  padding: 8px 0 0;
}

.chart-scale {
  display: grid;
  align-items: start;
  color: #715f4d;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.chart-plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 144px;
  padding: 0 8px 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(194, 150, 85, 0.18) 0 1px, transparent 1px 33.333%, rgba(194, 150, 85, 0.14) 33.333% calc(33.333% + 1px), transparent calc(33.333% + 1px) 66.666%, rgba(194, 150, 85, 0.12) 66.666% calc(66.666% + 1px), transparent calc(66.666% + 1px) 100%);
}

.chart-plot::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 34px;
  top: 50px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #946725, #b78237);
  transform: rotate(-3deg);
  transform-origin: left center;
  opacity: 0.88;
  pointer-events: none;
}

.chart-plot article {
  position: relative;
  display: grid;
  justify-items: center;
  align-items: end;
  min-height: 120px;
}

.chart-plot article i {
  width: min(34px, 70%);
  height: var(--bar);
  min-height: 12px;
  border-radius: 2px 2px 0 0;
  background: rgba(194, 150, 85, 0.28);
}

.chart-plot article b {
  position: absolute;
  bottom: calc(var(--dot) + 22px);
  width: 8px;
  height: 8px;
  border: 2px solid #946725;
  border-radius: 50%;
  background: #fcf8f3;
  box-shadow: 0 0 0 2px rgba(252, 248, 243, 0.9);
}

.chart-plot article small {
  position: absolute;
  bottom: 0;
  max-width: 82px;
  overflow: hidden;
  color: #5c4b3b;
  font-size: 10px;
  font-weight: 750;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 20px;
  margin-top: 3px;
  color: #5f5144;
  font-size: 11px;
  font-weight: 800;
}

.chart-legend span,
.chart-legend strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i,
.chart-legend b {
  display: inline-block;
  width: 18px;
  height: 7px;
}

.chart-legend i {
  background: rgba(194, 150, 85, 0.28);
}

.chart-legend b {
  height: 2px;
  background: #946725;
}

.readiness-panel .module-chip-grid {
  display: none;
}

.dashboard-bottom-grid .panel {
  min-height: 0;
}

.dashboard-bottom-grid-legacy {
  display: none;
}

.dashboard-quad-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.95fr) minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 12px;
}

.dashboard-quad-grid .panel {
  min-height: 138px;
  padding: 12px;
}

.dashboard-quad-grid .panel-head {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.dashboard-quad-grid .panel-head h2 {
  font-size: 18px;
}

.mini-ledger,
.mini-progress-list,
.mini-reminders {
  display: grid;
}

.mini-ledger article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.5);
}

.mini-ledger article:last-child {
  border-bottom: 0;
}

.mini-ledger span,
.mini-progress-list span,
.mini-reminders span {
  color: #62513f;
  font-size: 12px;
  font-weight: 800;
}

.mini-ledger strong {
  color: #2d7d49;
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.mini-progress-list {
  gap: 8px;
}

.mini-progress-list article {
  display: grid;
  gap: 5px;
}

.mini-progress-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-progress-list strong {
  color: #6f522d;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.mini-progress-list i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(230, 206, 172, 0.58);
}

.mini-progress-list i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--progress);
  border-radius: inherit;
  background: linear-gradient(90deg, #946725, #c29655);
}

.mini-reminders {
  gap: 7px;
}

.mini-reminders article {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.mini-reminders time {
  justify-self: start;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #6f522d;
  background: rgba(194, 150, 85, 0.12);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.mini-reminders span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-quick-panel .quick-actions-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.mini-quick-panel .quick-actions-grid a {
  min-height: 47px;
  gap: 4px;
  padding: 6px;
  font-size: 10px;
}

.mini-quick-panel .quick-actions-grid a::before {
  width: 17px;
  height: 17px;
}

.auto-scale-content[data-layout-1180="true"] .dashboard-quad-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-scale-content[data-layout-900="true"] .dashboard-quad-grid,
.auto-scale-content[data-layout-640="true"] .dashboard-quad-grid {
  grid-template-columns: 1fr;
}

.sidebar {
  gap: 12px;
}

.brand {
  min-height: 118px;
}

.brand img {
  width: 122px;
  height: 78px;
}

.sidebar-nav {
  gap: 4px;
}

.sidebar-nav > a {
  min-height: 39px;
  padding: 7px 12px;
}

.sidebar-admin-drawer {
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid rgba(194, 150, 85, 0.18);
}

.sidebar-admin-drawer summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 7px;
  color: #7b6040;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.sidebar-admin-drawer summary::-webkit-details-marker {
  display: none;
}

.sidebar-admin-drawer summary:hover {
  color: #946725;
  background: rgba(194, 150, 85, 0.08);
}

.sidebar-admin-drawer summary span:nth-child(2) {
  font-size: 0;
}

.sidebar-admin-drawer summary span:nth-child(2)::after {
  content: "Y\00f6netim";
  font-size: 12px;
}

.sidebar-admin-drawer summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.sidebar-admin-drawer[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.sidebar-admin-drawer summary .nav-mark {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
}

.sidebar-admin-drawer summary .nav-mark::before {
  width: 14px;
  height: 14px;
}

.sidebar-admin-links {
  display: grid;
  gap: 2px;
  margin-top: 4px;
}

.sidebar-admin-links a.is-admin-link {
  min-height: 30px;
  padding: 5px 10px 5px 18px;
  color: #65513b;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-admin-links a.is-admin-link .nav-mark {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
}

.sidebar-admin-links a.is-admin-link .nav-mark::before {
  width: 13px;
  height: 13px;
}

.sidebar-admin-links a.is-admin-link.is-active {
  color: #fff;
  border-color: rgba(148, 103, 37, 0.38);
  background: linear-gradient(180deg, #b9822f 0%, #946725 100%);
  box-shadow: 0 10px 18px rgba(126, 83, 22, 0.14);
}

.sidebar-admin-links a.is-admin-link.is-active .nav-mark {
  color: #fff5df;
}

.brand {
  min-height: 144px;
}

.brand img {
  width: 152px;
  height: 98px;
}

.topbar {
  min-height: 98px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.topbar-search {
  flex-basis: 560px;
  max-width: 560px;
}

.topbar-left {
  flex: 0 0 690px;
  gap: 32px;
}

.topbar-actions {
  gap: 18px;
}

.farm-status {
  min-width: 232px;
}

.metric {
  min-height: 104px;
}

.auto-scale-content[data-layout-1180="true"] .topbar-left,
.auto-scale-content[data-layout-900="true"] .topbar-left,
.auto-scale-content[data-layout-640="true"] .topbar-left {
  flex: 1 1 auto;
}

/* Management screens: match the reference ERP density beyond the dashboard. */
.toolbar {
  min-height: 76px;
  padding: 12px 14px;
  border-color: rgba(194, 150, 85, 0.22);
  background: rgba(252, 248, 243, 0.82);
  box-shadow: 0 10px 28px rgba(75, 53, 27, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.toolbar h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.filter-form {
  gap: 10px;
}

.filter-form label span,
.fields label > span {
  color: #7c5a27;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-frame .filter-form input,
.app-frame .filter-form select {
  min-height: 38px;
}

.app-frame .button {
  min-height: 40px;
  border-color: rgba(126, 83, 22, 0.2);
  background: linear-gradient(180deg, #b9822f 0%, #946725 100%);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(126, 83, 22, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.app-frame .button.secondary,
.app-frame .button.ghost {
  color: #7b5118;
  background: rgba(255, 253, 249, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.table-wrap,
.permission-table-wrap {
  border-color: rgba(194, 150, 85, 0.22);
  background: rgba(255, 253, 249, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

th,
td {
  padding: 11px 14px;
  border-bottom-color: rgba(226, 202, 169, 0.58);
}

thead th {
  height: 40px;
  background: rgba(248, 234, 214, 0.66);
  font-size: 11px;
  letter-spacing: 0.04em;
}

tbody tr:hover {
  background: rgba(255, 247, 237, 0.62);
}

.entity-cell {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.entity-avatar,
.entity-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(194, 150, 85, 0.28);
  border-radius: 999px;
  color: #946725;
  background: rgba(248, 234, 214, 0.76);
  font-size: 15px;
  font-weight: 900;
}

.entity-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: var(--entity-icon) center / contain no-repeat;
  mask: var(--entity-icon) center / contain no-repeat;
}

.entity-cell strong,
.entity-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge,
.count-pill,
.code-pill,
.module-pill {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
}

.module-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  color: #7b5118;
  border: 1px solid rgba(194, 150, 85, 0.24);
  background: rgba(248, 234, 214, 0.62);
  font-weight: 900;
  white-space: nowrap;
}

.module-pill::before {
  content: "";
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--module-icon) center / contain no-repeat;
  mask: var(--module-icon) center / contain no-repeat;
}

.activity-list .module-pill {
  align-self: start;
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.split-grid .entity-cell {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
}

.split-grid .entity-avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.log-panel .table-wrap {
  max-height: calc(100vh - 430px);
}

.log-panel thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 rgba(194, 150, 85, 0.26);
}

.role-check-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.check-card {
  min-height: 68px;
  padding: 12px;
  background: rgba(255, 253, 249, 0.7);
}

.permission-tools {
  justify-content: flex-end;
  position: sticky;
  top: 104px;
  z-index: 2;
  padding: 0 0 10px;
  background: rgba(252, 248, 243, 0.92);
}

.permission-table {
  min-width: 1180px;
}

.permission-table-wrap {
  max-height: calc(100vh - 470px);
}

.permission-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  box-shadow: inset 0 -1px 0 rgba(194, 150, 85, 0.26);
}

.permission-table tbody th {
  width: 310px;
}

.module-cell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.module-cell > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 8px;
  color: #a8792f;
  background: rgba(248, 234, 214, 0.56);
}

.module-cell > span::before {
  content: "";
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: var(--module-icon) center / contain no-repeat;
  mask: var(--module-icon) center / contain no-repeat;
}

.matrix-check span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.92);
}

.matrix-check input:checked + span {
  background: #946725;
  box-shadow: inset 0 0 0 4px #fff7ed;
}

.form-grid {
  gap: 14px;
}

.fields {
  gap: 12px;
}

.app-frame .fields input,
.app-frame .fields select,
.app-frame .fields textarea {
  min-height: 42px;
  background: rgba(255, 253, 249, 0.9);
}

.form-actions {
  min-height: 58px;
  padding: 10px 12px;
}

.auto-scale-content[data-layout-1180="true"] .role-check-grid,
.auto-scale-content[data-layout-900="true"] .role-check-grid,
.auto-scale-content[data-layout-640="true"] .role-check-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-scale-content[data-layout-640="true"] .entity-cell {
  grid-template-columns: 34px minmax(0, 1fr);
}

.auto-scale-content[data-layout-640="true"] .entity-avatar,
.auto-scale-content[data-layout-640="true"] .entity-icon {
  width: 32px;
  height: 32px;
}

.sidebar-more-drawer {
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid rgba(194, 150, 85, 0.14);
}

.sidebar-more-drawer summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 7px;
  color: #7b6040;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.sidebar-more-drawer summary::-webkit-details-marker {
  display: none;
}

.sidebar-more-drawer summary:hover {
  color: #946725;
  background: rgba(194, 150, 85, 0.08);
}

.sidebar-more-drawer summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.18s ease;
}

.sidebar-more-drawer[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.sidebar-more-drawer summary .nav-mark {
  flex-basis: 22px;
  width: 22px;
  height: 22px;
}

.sidebar-more-drawer summary .nav-mark::before {
  width: 14px;
  height: 14px;
}

.form-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-context-strip article {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(194, 150, 85, 0.26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 35px 35px, rgba(194, 150, 85, 0.13) 0 24px, transparent 25px),
    rgba(252, 248, 243, 0.86);
  box-shadow: 0 12px 30px rgba(75, 53, 27, 0.055), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.form-context-strip article::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  color: rgba(148, 103, 37, 0.72);
  background: currentColor;
  -webkit-mask: var(--context-icon) center / contain no-repeat;
  mask: var(--context-icon) center / contain no-repeat;
}

.form-context-strip span,
.form-context-strip strong {
  grid-column: 2;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-context-strip span {
  grid-row: 1;
  color: #7c5a27;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-context-strip strong {
  grid-row: 2;
  margin-top: 4px;
  color: #30261d;
  font-size: 15px;
  font-weight: 900;
}

.module-context-strip {
  max-width: none;
}

.module-placeholder {
  max-width: none;
  min-height: 320px;
  overflow: hidden;
}

.module-placeholder::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -44px;
  width: 230px;
  height: 246px;
  color: rgba(126, 83, 22, 0.045);
  background: currentColor;
  pointer-events: none;
  -webkit-mask: var(--module-page-icon) center / contain no-repeat;
  mask: var(--module-page-icon) center / contain no-repeat;
}

.module-placeholder .lead,
.module-placeholder > p {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.module-placeholder-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.72fr);
  align-items: start;
  gap: 28px;
}

.module-copy p {
  max-width: 760px;
}

.module-permission-card {
  padding: 16px;
  border: 1px solid rgba(194, 150, 85, 0.22);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.module-permission-kicker,
.module-permission-card > strong {
  display: block;
}

.module-permission-kicker {
  color: #7c5a27;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.module-permission-card > strong {
  margin-top: 6px;
  color: #30261d;
  font-size: 18px;
  font-weight: 900;
}

.module-placeholder .permission-chips {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  margin-top: 14px;
}

.module-placeholder .permission-chips span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.auto-scale-content[data-layout-900="true"] .form-context-strip,
.auto-scale-content[data-layout-640="true"] .form-context-strip {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-1180="true"] .module-placeholder .permission-chips,
.auto-scale-content[data-layout-900="true"] .module-placeholder .permission-chips {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-scale-content[data-layout-1180="true"] .module-placeholder-body,
.auto-scale-content[data-layout-900="true"] .module-placeholder-body {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-640="true"] .module-placeholder .permission-chips {
  grid-template-columns: 1fr;
}

/* Farm dashboard reference pass */
.main-content:has(.farm-dashboard) {
  gap: 12px;
  padding: 16px 22px 14px;
}

.topbar {
  min-height: 78px;
  padding: 12px 28px;
}

.topbar-search {
  min-height: 52px;
  flex-basis: 618px;
  max-width: 628px;
}

.date-pill,
.farm-status,
.profile-pill {
  min-height: 52px;
}

.notification-pill {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
}

.topbar-actions > form {
  display: none;
}

.profile-pill {
  position: relative;
  grid-template-columns: 44px minmax(96px, max-content) 12px;
  padding-right: 10px;
}

.profile-pill::after {
  content: "";
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #7b6040;
  border-bottom: 1.5px solid #7b6040;
  transform: rotate(45deg) translateY(-2px);
}

.farm-dashboard {
  display: grid;
  gap: 12px;
}

.farm-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.farm-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 12px 16px;
  overflow: hidden;
  border: 1px solid rgba(226, 202, 169, 0.72);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 8px 24px rgba(74, 52, 26, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.farm-metric-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), transparent 46%);
  pointer-events: none;
}

.farm-metric-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  color: #a87322;
  background: rgba(248, 234, 214, 0.62);
}

.farm-metric-mark::before {
  content: "";
  width: 32px;
  height: 32px;
  background: currentColor;
  -webkit-mask: var(--metric-icon) center / contain no-repeat;
  mask: var(--metric-icon) center / contain no-repeat;
}

.farm-metric-card > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.farm-metric-card span:not(.farm-metric-mark) {
  display: block;
  overflow: hidden;
  color: #4c3b2b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-metric-card strong {
  display: block;
  margin-top: 6px;
  color: #231b14;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.farm-metric-card p {
  margin: 6px 0 0;
  overflow: hidden;
  color: #665744;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-metric-card.positive p {
  color: #27915b;
}

.farm-metric-card.danger p {
  color: #bd2f33;
}

.farm-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(360px, 1fr);
  grid-template-areas:
    "trend tasks"
    "health occupancy";
  gap: 12px;
  align-items: start;
}

.farm-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 0.82fr) minmax(0, 1.08fr) minmax(0, 1.08fr);
  gap: 12px;
}

.farm-dashboard .panel {
  border-color: rgba(226, 202, 169, 0.72);
  background: rgba(255, 253, 249, 0.9);
  box-shadow: 0 9px 26px rgba(74, 52, 26, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.farm-dashboard .panel::before {
  display: none;
}

.farm-panel {
  padding: 16px 18px;
}

.farm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 12px;
}

.farm-panel-head h2 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: #2b2118;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
}

.farm-panel-head h2 small {
  color: #6d5a43;
  font-size: 11px;
  font-weight: 750;
}

.farm-panel-head a,
.farm-add-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #946725;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.farm-panel-head a::after,
.farm-add-link::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.farm-select {
  min-width: 128px;
  padding: 8px 28px 8px 12px;
  border: 1px solid rgba(226, 202, 169, 0.8);
  border-radius: 7px;
  color: #4b3d2e;
  background:
    linear-gradient(45deg, transparent 50%, #8b735a 50%) right 13px center / 6px 6px no-repeat,
    linear-gradient(135deg, #8b735a 50%, transparent 50%) right 9px center / 6px 6px no-repeat,
    rgba(255, 253, 249, 0.92);
  font-size: 12px;
  font-weight: 750;
}

.trend-panel {
  grid-area: trend;
  position: relative;
  min-height: 316px;
}

.today-tasks-panel {
  grid-area: tasks;
  min-height: 316px;
}

.health-records-panel {
  grid-area: health;
  min-height: 208px;
}

.occupancy-panel {
  grid-area: occupancy;
  min-height: 174px;
}

.farm-chart {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  grid-template-rows: 202px 28px;
  gap: 0 8px;
  padding-top: 16px;
}

.farm-y-axis {
  display: grid;
  align-content: space-between;
  color: #655545;
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.farm-y-axis.left {
  text-align: right;
}

.farm-y-axis.right {
  text-align: left;
}

.farm-chart-plot {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(226, 202, 169, 0.68);
  background:
    linear-gradient(180deg, rgba(226, 202, 169, 0.62) 0 1px, transparent 1px 25%, rgba(226, 202, 169, 0.56) 25% calc(25% + 1px), transparent calc(25% + 1px) 50%, rgba(226, 202, 169, 0.5) 50% calc(50% + 1px), transparent calc(50% + 1px) 75%, rgba(226, 202, 169, 0.44) 75% calc(75% + 1px), transparent calc(75% + 1px) 100%);
}

.farm-chart-bars {
  position: absolute;
  inset: 0 10px 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 18px;
  padding: 0 12px;
}

.farm-chart-bars i {
  display: block;
  width: 100%;
  max-width: 30px;
  height: var(--bar-height);
  margin: 0 auto;
  border-radius: 2px 2px 0 0;
  background: rgba(226, 202, 169, 0.72);
}

.farm-trend-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.farm-trend-line polyline {
  fill: none;
  stroke: #a87322;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.farm-trend-line circle {
  fill: #fffdf9;
  stroke: #a87322;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.farm-months {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding-top: 10px;
}

.farm-months span {
  overflow: hidden;
  color: #4e4338;
  font-size: 11px;
  font-weight: 650;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-chart-legend {
  position: absolute;
  top: 58px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 34px;
  color: #5c4a39;
  font-size: 12px;
  font-weight: 750;
  transform: translateX(-50%);
}

.farm-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.farm-chart-legend i {
  display: inline-block;
  width: 24px;
  height: 8px;
}

.farm-chart-legend .line {
  height: 2px;
  background: #a87322;
}

.farm-chart-legend .bar {
  background: rgba(226, 202, 169, 0.72);
}

.farm-task-list {
  display: grid;
  border-top: 1px solid rgba(226, 202, 169, 0.6);
}

.farm-task-list article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.58);
}

.farm-task-list time {
  color: #4f4030;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.farm-task-list strong,
.farm-task-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.farm-task-list strong {
  color: #30261d;
  font-size: 12px;
  font-weight: 850;
}

.farm-task-list small {
  margin-top: 2px;
  color: #5f5144;
  font-size: 11px;
  font-weight: 650;
}

.farm-badge {
  min-width: 88px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.farm-badge.done {
  color: #2f8b58;
  background: rgba(47, 156, 91, 0.12);
}

.farm-badge.running {
  color: #a66a19;
  background: rgba(194, 150, 85, 0.18);
}

.farm-badge.waiting {
  color: #4a6f96;
  background: rgba(74, 111, 150, 0.12);
}

.today-tasks-panel .farm-add-link,
.reminder-panel .farm-add-link {
  justify-content: center;
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
}

.today-tasks-panel .farm-add-link::after,
.reminder-panel .farm-add-link::after {
  display: none;
}

.farm-table-wrap {
  overflow: hidden;
}

.farm-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.farm-table th,
.farm-table td {
  height: 28px;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.58);
  color: #30261d;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
}

.farm-table th {
  height: 26px;
  color: #2e241b;
  background: transparent;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.farm-table td:nth-child(4) {
  max-width: 320px;
  overflow: hidden;
  color: #4d4034;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.farm-status-text {
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.farm-status-text.good {
  color: #2f8b58;
}

.farm-status-text.warning {
  color: #a66a19;
}

.occupancy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: center;
}

.occupancy-grid article {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.donut {
  display: block;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 253, 249, 0.98) 0 55%, transparent 56%),
    conic-gradient(#a87322 0 var(--value), rgba(226, 202, 169, 0.58) var(--value) 100%);
  box-shadow: inset 0 0 0 1px rgba(194, 150, 85, 0.08);
}

.occupancy-grid span:not(.donut),
.occupancy-grid strong,
.occupancy-grid small {
  display: block;
}

.occupancy-grid span:not(.donut) {
  color: #4f4030;
  font-size: 12px;
  font-weight: 750;
}

.occupancy-grid strong {
  margin-top: 8px;
  color: #252019;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.occupancy-grid small {
  margin-top: 7px;
  color: #5f6880;
  font-size: 12px;
  font-weight: 650;
}

.finance-list {
  display: grid;
}

.finance-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.58);
}

.finance-list article:last-child {
  border-bottom: 0;
}

.finance-list span {
  color: #4c4035;
  font-size: 12px;
  font-weight: 650;
}

.finance-list strong {
  font-size: 18px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.finance-list .positive {
  color: #1f9b5a;
}

.finance-list .danger {
  color: #bd2f33;
}

.farm-head-icon {
  width: 20px;
  height: 20px;
  color: #a87322;
  background: currentColor;
  -webkit-mask: var(--head-icon) center / contain no-repeat;
  mask: var(--head-icon) center / contain no-repeat;
}

.stock-list,
.reminder-list {
  display: grid;
  gap: 10px;
}

.stock-list article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.stock-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #a87322;
}

.stock-icon::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--stock-icon) center / contain no-repeat;
  mask: var(--stock-icon) center / contain no-repeat;
}

.stock-list article > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.stock-list article > div > div,
.reminder-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stock-list strong,
.stock-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-list strong {
  color: #30261d;
  font-size: 12px;
  font-weight: 850;
}

.stock-list small {
  color: #5f5144;
  font-size: 11px;
  font-weight: 650;
}

.stock-list i {
  position: relative;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 202, 169, 0.5);
}

.stock-list i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--stock-progress);
  border-radius: inherit;
  background: #4aa36d;
}

.stock-list .warning i::before {
  background: #a87322;
}

.stock-list .danger i::before {
  background: #bd2f33;
}

.reminder-list article {
  min-height: 31px;
}

.reminder-list time,
.reminder-list span {
  overflow: hidden;
  color: #43372d;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-list time {
  flex: 0 0 76px;
  font-variant-numeric: tabular-nums;
}

.reminder-list span {
  flex: 1 1 auto;
}

.reminder-list b {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 5px 10px;
  border-radius: 6px;
  color: #655849;
  background: rgba(238, 230, 219, 0.82);
  font-size: 11px;
  font-weight: 650;
  text-align: center;
}

.farm-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.farm-quick-grid a {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 66px;
  padding: 9px 8px;
  border: 1px solid rgba(226, 202, 169, 0.78);
  border-radius: 8px;
  color: #4c4035;
  background: rgba(255, 253, 249, 0.72);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  line-height: 1.2;
}

.farm-quick-grid a span {
  width: 26px;
  height: 26px;
  color: #a87322;
  background: currentColor;
  -webkit-mask: var(--quick-icon) center / contain no-repeat;
  mask: var(--quick-icon) center / contain no-repeat;
}

.auto-scale-content[data-layout-1180="true"] .farm-metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auto-scale-content[data-layout-1180="true"] .farm-dashboard-grid,
.auto-scale-content[data-layout-900="true"] .farm-dashboard-grid {
  grid-template-columns: 1fr;
  grid-template-areas:
    "trend"
    "tasks"
    "health"
    "occupancy";
}

.auto-scale-content[data-layout-1180="true"] .farm-summary-grid,
.auto-scale-content[data-layout-900="true"] .farm-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auto-scale-content[data-layout-900="true"] .farm-metric-grid,
.auto-scale-content[data-layout-640="true"] .farm-metric-grid {
  grid-template-columns: 1fr;
}

.auto-scale-content[data-layout-640="true"] .farm-summary-grid,
.auto-scale-content[data-layout-640="true"] .occupancy-grid,
.auto-scale-content[data-layout-640="true"] .farm-quick-grid {
  grid-template-columns: 1fr;
}

/* Management screen alignment pass */
.list-context-strip {
  gap: 12px;
}

.list-context-strip article {
  min-height: 72px;
  padding: 11px 14px;
  background:
    radial-gradient(circle at 36px 35px, rgba(194, 150, 85, 0.12) 0 23px, transparent 24px),
    rgba(255, 253, 249, 0.78);
  box-shadow: 0 9px 24px rgba(74, 52, 26, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.list-context-strip article::before {
  width: 26px;
  height: 26px;
}

.list-context-strip strong {
  font-size: 16px;
}

.toolbar {
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar > div:first-child {
  flex: 0 0 auto;
  min-width: 210px;
}

.toolbar .filter-form {
  margin-left: auto;
}

.toolbar .filter-form label {
  min-width: 178px;
}

.toolbar .filter-form input,
.toolbar .filter-form select {
  min-width: 190px;
}

.toolbar .button {
  white-space: nowrap;
}

.panel > .table-wrap:first-child {
  margin-top: 0;
}

.panel .panel-head + .table-wrap {
  margin-top: -2px;
}

.row-actions {
  gap: 7px;
}

.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(194, 150, 85, 0.24);
  border-radius: 7px;
  color: #7b5118;
  background: rgba(255, 253, 249, 0.72);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.small-link.danger {
  color: #9b2f2f;
  border-color: rgba(155, 47, 47, 0.18);
  background: rgba(255, 240, 239, 0.56);
}

.small-link:disabled,
.small-link[disabled] {
  opacity: 0.42;
}

.auto-scale-content[data-layout-900="true"] .toolbar .filter-form {
  width: 100%;
  margin-left: 0;
}

.auto-scale-content[data-layout-640="true"] .toolbar {
  align-items: stretch;
}

.auto-scale-content[data-layout-640="true"] .toolbar > div:first-child,
.auto-scale-content[data-layout-640="true"] .toolbar .filter-form,
.auto-scale-content[data-layout-640="true"] .toolbar .filter-form label,
.auto-scale-content[data-layout-640="true"] .toolbar .button {
  width: 100%;
}

form:has(.permission-table-wrap) .permission-table-wrap {
  max-height: calc(100vh - 610px);
  min-height: 410px;
}

form:has(.permission-table-wrap) .form-actions {
  position: sticky;
  bottom: 14px;
  z-index: 3;
  margin-top: 8px;
  background: rgba(252, 248, 243, 0.92);
  backdrop-filter: blur(10px);
}

/* Remaining panel screens reference pass */
.audit-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.audit-column {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 202, 169, 0.72);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.audit-column-head {
  display: grid;
  gap: 4px;
  min-height: 34px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(226, 202, 169, 0.58);
}

.audit-column-head h3 {
  margin: 0;
  color: #2f251b;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.user-activity-panel .activity-list {
  max-height: calc(100vh - 390px);
  overflow: auto;
  padding-right: 4px;
}

.user-activity-panel .activity-list article {
  grid-template-columns: minmax(94px, 0.32fr) minmax(0, 1fr);
  min-height: 56px;
}

.user-activity-panel .activity-list .module-pill,
.user-activity-panel .activity-list .code-pill {
  align-self: center;
  justify-self: start;
  max-width: 150px;
}

.profile-workspace,
.settings-workspace {
  gap: 12px;
}

.profile-workspace .profile-main-panel,
.profile-workspace .profile-security-panel,
.settings-main-panel {
  padding: 16px;
}

.profile-workspace .fields,
.settings-workspace .fields {
  gap: 12px;
}

.profile-activity-panel .activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-activity-panel .activity-list article {
  min-height: 58px;
  border: 1px solid rgba(226, 202, 169, 0.58);
  background: rgba(255, 253, 249, 0.62);
}

.settings-main-panel {
  position: relative;
  overflow: hidden;
}

.settings-main-panel::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: -30px;
  width: 162px;
  height: 162px;
  color: rgba(126, 83, 22, 0.04);
  background: currentColor;
  pointer-events: none;
  -webkit-mask: url("../img/cameloticon.svg") center / contain no-repeat;
  mask: url("../img/cameloticon.svg") center / contain no-repeat;
}

.settings-main-panel .fields,
.settings-main-panel .panel-head {
  position: relative;
  z-index: 1;
}

.log-panel .table-wrap {
  border-radius: 8px;
}

.log-panel td:nth-child(5) {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-context-strip + .module-placeholder {
  margin-top: 0;
}

.module-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-hero-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(194, 150, 85, 0.25);
  border-radius: 8px;
  color: #a87322;
  background: rgba(248, 234, 214, 0.62);
}

.module-hero-icon::before {
  content: "";
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: var(--module-icon) center / contain no-repeat;
  mask: var(--module-icon) center / contain no-repeat;
}

.auto-scale-content[data-layout-900="true"] .audit-split-grid,
.auto-scale-content[data-layout-900="true"] .profile-activity-panel .activity-list,
.auto-scale-content[data-layout-640="true"] .audit-split-grid,
.auto-scale-content[data-layout-640="true"] .profile-activity-panel .activity-list {
  grid-template-columns: 1fr;
}
