:root {
  --pink-50: #fff7f3;
  --pink-100: #f9e5e1;
  --pink-200: #edc8c3;
  --pink-300: #d99a98;
  --pink-500: #9f1835;
  --pink-600: #7d1029;
  --pink-700: #57091c;
  --ink: #30191e;
  --ink-soft: #55343a;
  --muted: #766064;
  --line: #ead8d4;
  --surface: #ffffff;
  --canvas: #fff8f3;
  --green: #17b978;
  --green-soft: #dbfaea;
  --red: #dc3545;
  --red-soft: #fff0f1;
  --blue-soft: #e6f0ff;
  --orange-soft: #fff2ce;
  --shadow: 0 12px 32px rgba(91, 22, 39, 0.1);
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

.ui-icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--pink-500);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

.admin-layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 25px 18px;
  border-right: 1px solid #5e2030;
  background:
    linear-gradient(180deg, rgba(74, 10, 28, 0.72), rgba(35, 6, 16, 0.9)),
    url("../../assets/images/admin/sidebar-farm.webp") center / cover no-repeat,
    #310916;
  color: #fff;
}

.sidebar-brand,
.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-crown,
.brand-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffcf63, #f6a818);
  box-shadow: 0 8px 18px rgba(255, 176, 0, 0.2);
  color: #fff;
}

.brand-crown .ui-icon,
.brand-symbol .ui-icon {
  width: 24px;
  height: 24px;
}

.sidebar-brand>span:last-child,
.auth-brand>span:last-child {
  display: grid;
}

.sidebar-brand strong,
.auth-brand strong {
  color: #ffd9cf;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.sidebar-brand small,
.auth-brand small {
  margin-top: 1px;
  color: #9ba6a1;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.sidebar-nav {
  display: grid;
  gap: 7px;
  margin-top: 45px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 12px;
  color: #c3c1c8;
  font-size: 14px;
  font-weight: 750;
  transition: 160ms ease;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--pink-500), var(--pink-600));
  box-shadow: 0 8px 22px rgba(79, 8, 27, 0.38);
  color: #fff;
}

.sidebar-nav a span {
  width: 22px;
  display: grid;
  place-items: center;
  text-align: center;
}

.sidebar-nav .ui-icon {
  width: 19px;
  height: 19px;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-footer div {
  display: grid;
}

.sidebar-footer strong {
  font-size: 11px;
}

.sidebar-footer small {
  margin-top: 3px;
  color: #92909a;
  font-size: 9px;
}

.sync-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #28d491;
  box-shadow: 0 0 0 4px rgba(40, 212, 145, 0.14);
}

.admin-main {
  min-width: 0;
  margin-left: var(--sidebar-width);
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.topbar h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.6px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 11px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.admin-user>span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--pink-100);
  color: var(--pink-600);
}

.admin-user .ui-icon,
.menu-button .ui-icon,
.icon-button .ui-icon {
  width: 19px;
  height: 19px;
}

.admin-user div {
  display: grid;
}

.admin-user strong {
  font-size: 11px;
}

.admin-user small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.menu-button,
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink-soft);
}

.menu-button {
  display: none;
}

.content {
  width: min(100%, 1700px);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 38px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stats-grid article {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(50, 28, 40, 0.03);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  font-size: 21px;
  font-weight: 900;
}

.stat-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.stat-icon.pink {
  background: var(--pink-100);
  color: var(--pink-600);
}

.stat-icon.blue {
  background: var(--blue-soft);
}

.stat-icon.green {
  background: var(--green-soft);
  color: #079259;
}

.stat-icon.orange {
  background: var(--orange-soft);
  color: #dc8b00;
}

.stats-grid article div {
  min-width: 0;
  display: grid;
}

.stats-grid small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.stats-grid strong {
  margin-top: 1px;
  font-size: 24px;
  line-height: 1;
}

.stats-grid article div span {
  margin-top: 4px;
  overflow: hidden;
  color: #9aa39f;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-heading {
  min-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.35px;
}

.panel-heading>div>span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.panel-actions,
.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  transition: 150ms ease;
}

.button {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 12px;
}

.button.primary {
  border-color: var(--pink-500);
  background: linear-gradient(135deg, var(--pink-500), var(--pink-600));
  box-shadow: 0 7px 17px rgba(125, 16, 41, 0.22);
  color: #fff;
}

.button.ghost,
.button.filter-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink-soft);
}

.button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.button.wide {
  width: 100%;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(170px, 0.8fr) minmax(150px, 0.65fr) auto;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff8f4;
}

.filters input,
.filters select,
.form-grid input,
.form-grid select,
.form-grid textarea,
.auth-form input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.filters input,
.filters select {
  padding: 10px 12px;
  font-size: 12px;
}

.filters input:focus,
.filters select:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.auth-form input:focus {
  border-color: var(--pink-400, #ef74af);
  box-shadow: 0 0 0 3px rgba(159, 24, 53, 0.11);
}

.search-field {
  position: relative;
}

.search-field span {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-field input {
  padding-left: 35px;
}

.table-summary {
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fbfcfd;
  color: #63736c;
  font-size: 10px;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

td {
  font-size: 12px;
}

tbody tr:hover {
  background: #fff8f4;
}

.actions-column {
  text-align: right;
}

.product-cell {
  min-width: 270px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-thumb {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #e2e9ee;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #eef5fa);
  font-size: 27px;
}

.table-thumb img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.product-cell>div:last-child,
.machine-card-copy {
  min-width: 0;
  display: grid;
}

.product-cell strong,
.machine-name,
.machine-card-copy strong {
  font-size: 13px;
}

.machine-name,
.subtext {
  display: block;
}

.product-cell span,
.subtext,
.machine-card-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.product-cell code,
.machine-card-copy code {
  width: fit-content;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #f2f5f4;
  color: #6d7974;
  font-size: 8px;
}

.level-badge,
.stock-quantity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.level-badge {
  padding: 6px 9px;
  background: #f0f4f7;
}

.stock-quantity-badge {
  min-width: 86px;
  padding: 7px 11px;
  border: 0;
}

.stock-quantity-badge.stock-positive {
  background: var(--green-soft);
  color: #08784b;
}

.stock-quantity-badge.stock-zero {
  background: var(--red-soft);
  color: #b52d3b;
}

.stock-quantity-badge::before {
  margin-right: 5px;
  content: "●";
  font-size: 7px;
}

.file-name {
  max-width: 155px;
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  justify-content: flex-end;
}

.row-actions form,
.inline-form {
  margin: 0;
}

.small-button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: #dce5eb;
  background: #f6f9fb;
  color: var(--ink-soft);
  font-size: 10px;
}

.small-button.danger {
  min-width: 34px;
  border-color: #ffc8ce;
  background: var(--red-soft);
  color: var(--red);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 16px;
  color: var(--muted);
  font-size: 11px;
}

.pagination a {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--pink-600);
  font-weight: 800;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 35px;
  text-align: center;
}

.empty-state>span {
  font-size: 35px;
}

.empty-state strong {
  margin-top: 8px;
}

.empty-state p {
  margin: 4px 0 0;
  color: var(--muted);
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.machine-card {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.machine-icon {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--pink-50);
  font-size: 26px;
}

.machine-metrics {
  grid-column: 2 / 4;
  display: flex;
  gap: 8px;
}

.machine-metrics span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f4f7f6;
  color: var(--muted);
  font-size: 9px;
}

.machine-card .row-actions {
  grid-column: 3;
  grid-row: 1;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.settings-form {
  padding: 22px;
}

.security-section {
  border-top: 1px solid var(--line);
  background: #fff8f4;
}

.security-section>div {
  padding: 20px 22px 0;
}

.security-section h2 {
  margin: 0;
  font-size: 17px;
}

.security-section>div>p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.password-form {
  padding-top: 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.auth-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.form-grid label>span,
.auth-form label>span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.auth-form input {
  padding: 10px 12px;
  font-size: 12px;
}

.form-grid textarea {
  resize: vertical;
}

.form-grid small,
.form-hint {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.full-width {
  grid-column: 1 / -1;
}

.price-tier-editor {
  min-width: 0;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--pink-50);
}

.price-tier-editor legend {
  padding: 0 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

.price-tier-heading,
.price-tier-row {
  display: grid;
  align-items: end;
  gap: 10px;
}

.price-tier-heading {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.price-tier-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.price-tier-rows {
  display: grid;
  gap: 9px;
}

.price-tier-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.price-tier-remove {
  min-height: 43px;
}

.price-tier-summary {
  min-width: 135px;
  line-height: 1.55;
}

.checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--pink-50);
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--pink-500);
}

.checkbox-field>span {
  display: grid;
}

.checkbox-field small {
  margin-top: 2px;
}

.form-actions {
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.activity-panel {
  box-shadow: none;
}

.activity-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px 20px 18px;
  list-style: none;
}

.activity-list li {
  position: relative;
  display: flex;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid #f0e7ec;
}

.activity-list li:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--pink-500);
  box-shadow: 0 0 0 4px var(--pink-100);
}

.activity-list li div {
  display: grid;
}

.activity-list strong {
  font-size: 10px;
}

.activity-list li span:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.empty-activity {
  color: var(--muted);
  font-size: 10px;
}

.sync-info {
  margin: 0 18px 18px;
  padding: 13px;
  border: 1px solid #c9f0df;
  border-radius: 12px;
  background: #f2fff9;
}

.sync-info strong {
  color: #08784b;
  font-size: 10px;
}

.sync-info p {
  margin: 5px 0 0;
  color: #557067;
  font-size: 9px;
  line-height: 1.5;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.alert.success {
  border-color: #a6e7ca;
  background: #effcf6;
  color: #08784b;
}

.alert.error {
  border-color: #ffc5cc;
  background: #fff2f3;
  color: #a92937;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 25px;
  background: rgba(22, 18, 30, 0.66);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(820px, 100%);
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(20, 10, 18, 0.3);
}

.modal-card.compact {
  width: min(660px, 100%);
}

.modal-card>header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.modal-card h2 {
  margin: 0;
  font-size: 20px;
}

.modal-card form {
  padding: 22px;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 24px;
}

.image-preview-row {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed var(--pink-300);
  border-radius: 12px;
  background: var(--pink-50);
}

.upload-preview {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.image-preview-row p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sidebar-overlay {
  display: none;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(430px, 0.72fr);
  min-height: 100vh;
  background: #fff8f3;
}

.auth-showcase {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(48px, 8vw, 130px);
  background:
    linear-gradient(90deg, rgba(54, 6, 20, 0.7), rgba(92, 13, 35, 0.57) 58%, rgba(115, 22, 45, 0.42)),
    url("../../assets/images/admin/login-desktop.webp") center / cover no-repeat;
  color: #fff;
}

.auth-showcase::after {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(transparent, rgba(45, 5, 17, 0.3));
  content: "";
  pointer-events: none;
}

.auth-showcase-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.auth-showcase-copy > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 3.5px;
}

.auth-showcase-copy > span::before {
  width: 38px;
  height: 3px;
  border-radius: 99px;
  background: #ffb11f;
  content: "";
}

.auth-showcase h1 {
  margin: 0;
  font-size: clamp(45px, 5vw, 78px);
  line-height: 0.98;
  letter-spacing: -2.8px;
}

.auth-showcase h1 strong {
  color: #ffb11f;
  font-weight: 950;
}

.auth-showcase p {
  max-width: 640px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1.75;
}

.auth-showcase-status {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.auth-showcase-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ee09d;
  box-shadow: 0 0 0 4px rgba(62, 224, 157, 0.14);
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(30px, 4vw, 64px);
  background:
    linear-gradient(rgba(255, 248, 243, 0.94), rgba(255, 248, 243, 0.98)),
    url("../../assets/images/admin/login-desktop.webp") 68% center / cover no-repeat;
}

.auth-brand {
  width: fit-content;
  margin: 0 0 24px;
  padding: 9px 14px 9px 9px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 32px rgba(76, 42, 25, 0.12);
  backdrop-filter: blur(14px);
}

.auth-card {
  width: 100%;
  max-width: 490px;
  padding: clamp(24px, 6vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 80px rgba(71, 41, 26, 0.2);
  backdrop-filter: blur(18px);
}

.auth-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid rgba(159, 24, 53, 0.16);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff3ed, #f3d5d0);
  box-shadow: 0 10px 24px rgba(125, 16, 41, 0.14);
  color: var(--pink-600);
}

.auth-icon .ui-icon {
  width: 30px;
  height: 30px;
}

.auth-card h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.9px;
}

.auth-card>p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 15px;
  margin-top: 23px;
}

.auth-form .form-hint {
  margin: -6px 0 0;
}

.back-link {
  width: fit-content;
  display: block;
  margin: 18px 0 0;
  padding: 7px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
  color: #5d5650;
  font-size: 11px;
  backdrop-filter: blur(10px);
}

@media (max-width: 1200px) {
  .machine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .auth-page {
    grid-template-columns: minmax(0, 1.25fr) minmax(400px, 0.75fr);
  }

  .auth-showcase {
    padding: 48px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .menu-button {
    display: grid;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(15, 12, 19, 0.5);
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .filter-button {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .auth-page {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    background:
      linear-gradient(180deg, rgba(255, 247, 251, 0.18), rgb(255 247 251 / 0%)), url(../../assets/images/admin/login-mobile.webp) center / cover no-repeat, #f9dfd1;
  }

  .auth-showcase {
    display: none;
  }

  .auth-shell {
    width: min(460px, 100%);
    min-height: auto;
    display: block;
    padding: 0;
    background: transparent;
  }

  .auth-brand {
    margin: 0 auto 18px;
  }

  .topbar {
    min-height: 66px;
  }

  .topbar .eyebrow,
  .admin-user,
  .topbar-actions>.button {
    display: none;
  }

  .topbar h1 {
    font-size: 19px;
  }

  .content {
    padding: 14px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stats-grid article {
    gap: 9px;
    padding: 12px;
  }

  .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 17px;
  }

  .stats-grid strong {
    font-size: 20px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .panel-actions {
    width: 100%;
  }

  .panel-actions .button,
  .panel-heading>.button {
    flex: 1;
  }

  .filters {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .search-field {
    grid-column: auto;
  }

  .machine-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }

  .price-tier-heading,
  .price-tier-row {
    grid-template-columns: 1fr;
  }

  .price-tier-heading .small-button,
  .price-tier-remove {
    width: 100%;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-card,
  .modal-card.compact {
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-card form,
  .modal-card>header {
    padding: 17px;
  }
}

@media (max-width: 430px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid article div>span,
  .stats-grid small {
    font-size: 8px;
  }

  .panel-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auth-page {
      padding: 18px 14px;
  }

  .auth-card {
      padding: 24px 20px;
      border-radius: 22px;
  }

  .back-link {
    margin: 18px auto 0;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
