/* ==========================================================================
   KOSY — админ-панель
   ========================================================================== */

:root {
  --bg: #f2ebe2;
  --bg-deep: #ece2d6;
  --panel: #fffaf4;
  --panel-soft: #f8f1e8;
  --ink: #2b1d19;
  --ink-2: #3d2a24;
  --muted: #746056;
  --line: rgba(43, 29, 25, 0.14);
  --line-strong: rgba(43, 29, 25, 0.26);
  --terra: #a24731;
  --terra-dark: #85372a;
  --terra-soft: #f0d9cd;
  --gold: #c89a63;
  --cream: #f9f2e9;
  --white: #fffaf4;
  --sidebar: #251916;
  --sidebar-2: #2f201c;
  --green: #5f7d5a;
  --green-soft: #e4eddf;
  --red: #a84a38;
  --red-soft: #f5e1db;
  --blue: #5b7181;
  --blue-soft: #e3ebf0;
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 8px 24px rgba(63, 38, 28, 0.05);
  --shadow-md: 0 24px 60px rgba(63, 38, 28, 0.13);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: var(--terra);
  color: var(--cream);
}

h1, h2, h3, h4, p, figure, blockquote {
  margin: 0;
}

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

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

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

svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   Shared bits
   ========================================================================== */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra);
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(183, 92, 68, 0.1);
}

.logo-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.abtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.abtn .icon {
  width: 16px;
  height: 16px;
}

.abtn:hover {
  transform: translateY(-1px);
}

.abtn-primary {
  background: var(--terra);
  color: var(--white, #fffaf4);
  box-shadow: 0 8px 20px rgba(183, 92, 68, 0.22);
}

.abtn-primary:hover {
  background: var(--terra-dark);
}

.abtn-dark {
  background: var(--ink);
  color: var(--cream);
}

.abtn-dark:hover {
  background: var(--terra);
}

.abtn-soft {
  background: var(--panel);
  border-color: var(--line);
  color: var(--ink);
}

.abtn-soft:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.abtn-danger {
  background: var(--red-soft);
  color: var(--red);
}

.abtn-danger:hover {
  background: var(--red);
  color: var(--white, #fffaf4);
}

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

.abtn-ghost:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

.abtn-wide {
  width: 100%;
}

.abtn-small {
  min-height: 36px;
  padding: 0 13px;
  font-size: 10px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.icon-btn.danger:hover {
  background: var(--red);
  border-color: var(--red);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--terra-soft);
  color: var(--terra-dark);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-soft.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge-soft.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge-soft.gold {
  background: #f5ead8;
  color: #9b7139;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 250, 244, 0.5);
}

.empty-state .empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--terra-soft);
  color: var(--terra);
  margin-bottom: 16px;
}

.empty-state .empty-icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state h3 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 8px;
}

.empty-state p {
  max-width: 380px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ==========================================================================
   Login
   ========================================================================== */

.login-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--bg);
}

.login-art {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #e8d7c5;
}

.login-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-art-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36, 23, 19, 0.18) 0%, rgba(36, 23, 19, 0.08) 40%, rgba(30, 18, 15, 0.72) 100%);
}

.login-art-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px 46px;
  color: var(--cream);
}

.login-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
}

.login-logo .logo-mark {
  color: var(--cream);
}

.login-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.login-logo-text strong {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
}

.login-logo-text small {
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}

.login-art blockquote {
  max-width: 460px;
  padding: 26px;
  border-radius: 20px;
  background: rgba(37, 25, 22, 0.38);
  border: 1px solid rgba(249, 242, 233, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-art blockquote .icon {
  width: 20px;
  height: 20px;
  color: var(--terra-soft);
  margin-bottom: 12px;
}

.login-art blockquote p {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.login-art blockquote span {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.58;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  background:
    radial-gradient(circle at 80% 15%, rgba(216, 160, 142, 0.24), transparent 48%),
    var(--bg);
}

.login-box {
  width: min(100%, 390px);
}

.login-box .eyebrow {
  margin-bottom: 20px;
}

.login-box h1 {
  font-family: var(--display);
  font-size: clamp(46px, 5vw, 62px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.login-lead {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.admin-field > span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 2px;
}

.admin-field > span b {
  color: var(--terra);
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(183, 92, 68, 0.1);
}

.admin-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238a7469' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.admin-field input::placeholder,
.admin-field textarea::placeholder {
  color: #ac9990;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

.password-toggle .icon {
  width: 16px;
  height: 16px;
}

.login-error {
  min-height: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--red);
}

.login-error:not(:empty) {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--red-soft);
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: var(--muted);
}

.login-foot a {
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.login-foot a:hover {
  color: var(--terra);
}

.login-hint {
  margin-top: 20px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(200, 154, 99, 0.11);
  font-size: 9px;
  line-height: 1.6;
  color: #8b6940;
}

.login-hint code {
  font-family: var(--sans);
  font-weight: 700;
}

/* ==========================================================================
   App shell
   ========================================================================== */

.admin-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(26px + env(safe-area-inset-top, 0px)) 18px calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--sidebar);
  color: var(--cream);
  overflow-y: auto;
  z-index: 60;
  overscroll-behavior: contain;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 26px;
}

.sidebar-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.sidebar-logo .logo-mark {
  width: 38px;
  height: 38px;
  color: var(--cream);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-logo-text strong {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
}

.sidebar-logo-text small {
  font-size: 7px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(249, 242, 233, 0.45);
}

.sidebar-close {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(249, 242, 233, 0.18);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-label {
  padding: 0 14px;
  margin: 12px 0 8px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(249, 242, 233, 0.32);
}

.nav-label-spaced {
  margin-top: 24px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(249, 242, 233, 0.67);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item .icon {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}

.nav-item:hover {
  background: rgba(249, 242, 233, 0.07);
  color: var(--cream);
}

.nav-item.is-active {
  background: var(--terra);
  color: var(--white, #fffaf4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.nav-item.is-active .icon {
  opacity: 1;
}

.nav-count {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(249, 242, 233, 0.1);
  font-size: 8px;
  font-weight: 700;
}

.nav-item.is-active .nav-count {
  background: rgba(255, 250, 244, 0.22);
}

.nav-count-accent {
  background: var(--terra);
  color: var(--white, #fffaf4);
}

.nav-item.is-active .nav-count-accent {
  background: rgba(255, 250, 244, 0.24);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 22px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: 10px;
  color: rgba(249, 242, 233, 0.52);
  border-radius: 9px;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(249, 242, 233, 0.06);
  color: var(--cream);
}

.sidebar-link .icon {
  width: 14px;
  height: 14px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 10px 0;
  border-top: 1px solid rgba(249, 242, 233, 0.1);
}

.sidebar-avatar,
.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--terra);
  color: var(--white, #fffaf4);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  flex: 0 0 auto;
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-user-text strong {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-text small {
  font-size: 8px;
  color: rgba(249, 242, 233, 0.4);
}

.sidebar-logout {
  margin-left: auto;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(249, 242, 233, 0.14);
  border-radius: 50%;
  background: transparent;
  color: rgba(249, 242, 233, 0.5);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-logout:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white, #fffaf4);
}

.sidebar-logout .icon {
  width: 14px;
  height: 14px;
}

.sidebar-overlay {
  display: none;
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 34px;
  background: rgba(242, 235, 226, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.admin-burger {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
}

.topbar-title {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-eyebrow {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra);
}

.topbar-title h1 {
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-date {
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 6px;
}

.topbar-avatar {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.admin-content {
  padding: 32px 34px 60px;
  width: 100%;
  max-width: 1420px;
}

.admin-loading {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.loader {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(183, 92, 68, 0.18);
  border-top-color: var(--terra);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   View head
   ========================================================================== */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.view-title-group .eyebrow {
  margin-bottom: 8px;
}

.view-title {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.view-subtitle {
  max-width: 600px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

/* ==========================================================================
   Overview
   ========================================================================== */

.overview-greeting {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.overview-greeting .eyebrow {
  margin-bottom: 8px;
}

.overview-greeting h2 {
  font-family: var(--display);
  font-size: 46px;
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.overview-greeting h2 em {
  color: var(--terra);
  font-style: italic;
}

.overview-greeting p {
  font-size: 11px;
  color: var(--muted);
}

.overview-date {
  padding-bottom: 5px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.stat-card.is-accent {
  background: var(--sidebar);
  color: var(--cream);
  border-color: transparent;
}

.stat-card.is-accent .stat-icon {
  background: rgba(249, 242, 233, 0.1);
  color: #d8a08e;
}

.stat-card.is-accent .stat-label,
.stat-card.is-accent .stat-note {
  color: rgba(249, 242, 233, 0.5);
}

.stat-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--terra-soft);
  color: var(--terra-dark);
}

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

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.stat-note {
  font-size: 8px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  margin-bottom: 22px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
}

.panel-head .panel-sub {
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}

.panel-link {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--terra);
  border-bottom: 1px solid rgba(183, 92, 68, 0.35);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: border-color 0.2s ease;
}

.panel-link:hover {
  border-color: var(--terra);
}

.panel-body {
  padding: 8px 22px 14px;
}

.mini-booking {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

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

.mini-booking-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  color: var(--terra-dark);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  flex: 0 0 auto;
}

.mini-booking-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mini-booking-main strong {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-booking-main small {
  font-size: 8px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-booking .status-pill {
  margin-left: auto;
}

.mini-review {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

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

.mini-review .stars-mini {
  margin-bottom: 4px;
}

.mini-review p {
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.mini-review span {
  font-size: 8px;
  color: var(--muted);
}

.panel-empty {
  padding: 34px 20px;
  text-align: center;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}

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

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: rgba(183, 92, 68, 0.3);
  box-shadow: var(--shadow-sm);
}

.quick-action-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--terra-soft);
  color: var(--terra-dark);
}

.quick-action-icon .icon {
  width: 16px;
  height: 16px;
}

.quick-action span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.quick-action strong {
  font-size: 10px;
  font-weight: 700;
}

.quick-action small {
  font-size: 8px;
  color: var(--muted);
}

/* ==========================================================================
   Statuses
   ========================================================================== */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-new {
  background: #fbe7df;
  color: var(--terra-dark);
}

.status-confirmed {
  background: var(--blue-soft);
  color: var(--blue);
}

.status-done {
  background: var(--green-soft);
  color: var(--green);
}

.status-cancelled {
  background: #eee5df;
  color: var(--muted);
}

.status-pending {
  background: #f5ead8;
  color: #9b7139;
}

.status-published {
  background: var(--green-soft);
  color: var(--green);
}

/* ==========================================================================
   Works
   ========================================================================== */

.works-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.search-field {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-field .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 11px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-field input:focus {
  border-color: var(--terra);
  box-shadow: 0 0 0 3px rgba(183, 92, 68, 0.08);
}

.works-toolbar-count {
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.empty-grid {
  grid-column: 1 / -1;
}

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

.admin-work-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.admin-work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.admin-work-media {
  position: relative;
  aspect-ratio: 4 / 4.6;
  background: #eadccc;
  overflow: hidden;
}

.admin-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.admin-work-card:hover .admin-work-media img {
  transform: scale(1.03);
}

.admin-work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(30, 18, 15, 0.65));
  pointer-events: none;
}

.admin-work-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.admin-work-actions {
  position: absolute;
  top: 46px;
  right: 10px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.admin-work-card:hover .admin-work-actions,
.admin-work-actions:focus-within {
  opacity: 1;
  transform: translateX(0);
}

.icon-action {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 250, 244, 0.92);
  backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease, color 0.2s ease;
}

.icon-action .icon {
  width: 13px;
  height: 13px;
}

.icon-action:hover {
  background: var(--ink);
  color: var(--cream);
}

.icon-action.danger:hover {
  background: var(--red);
  color: var(--white, #fffaf4);
}

.admin-work-category {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(37, 25, 22, 0.55);
  backdrop-filter: blur(8px);
  color: var(--cream);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.featured-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-work-body {
  padding: 14px 16px 16px;
}

.admin-work-body h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-work-body p {
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-work-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.admin-work-price {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.admin-work-date {
  font-size: 8px;
  color: var(--muted);
}

.add-work-card {
  min-height: 380px;
  padding: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.add-work-card:hover {
  border-color: var(--terra);
  background: var(--panel);
  color: var(--terra);
}

.add-work-card span.add-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--terra-soft);
  color: var(--terra-dark);
}

.add-work-card span.add-icon .icon {
  width: 20px;
  height: 20px;
}

.add-work-card strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.add-work-card small {
  font-size: 9px;
}

/* ==========================================================================
   Reviews
   ========================================================================== */

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.pill-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 29, 25, 0.08);
  font-size: 7px;
  font-weight: 700;
}

.pill.is-active .pill-count {
  background: rgba(249, 242, 233, 0.18);
}

.admin-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.admin-review-card {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.admin-review-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.review-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--terra);
  color: var(--white, #fffaf4);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  flex: 0 0 auto;
}

.review-avatar-small.alt {
  background: var(--blue);
}

.review-avatar-small.alt-2 {
  background: var(--green);
}

.review-head-main {
  min-width: 0;
}

.review-head-main strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.review-head-main small {
  font-size: 9px;
  color: var(--muted);
}

.review-head-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-review-text {
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 14px;
  max-width: 900px;
}

.admin-review-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stars-mini {
  display: flex;
  gap: 1px;
  color: var(--gold);
}

.stars-mini svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  stroke: none;
}

.stars-mini svg.empty {
  opacity: 0.22;
}

.review-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.review-actions .abtn {
  min-height: 32px;
  padding: 0 11px;
  font-size: 9px;
}

.review-actions .icon-btn {
  width: 32px;
  height: 32px;
}

.review-actions .icon-btn .icon {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.services-table-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 130px 100px 70px 150px;
  gap: 14px;
  padding: 12px 20px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-service-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 130px 100px 70px 150px;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.admin-service-row:last-child {
  border-bottom: 0;
}

.admin-service-row:hover {
  background: rgba(248, 241, 232, 0.6);
}

.service-order {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
  font-family: var(--display);
  font-size: 12px;
  color: var(--muted);
}

.service-info {
  min-width: 0;
}

.service-info strong {
  display: block;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 2px;
}

.service-info small {
  display: block;
  font-size: 9px;
  line-height: 1.45;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.service-price-cell {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.service-duration-cell {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: flex-end;
}

.row-actions .icon-btn {
  width: 32px;
  height: 32px;
}

.row-actions .icon-btn .icon {
  width: 13px;
  height: 13px;
}

.move-buttons {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.move-btn {
  width: 24px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
}

.move-btn:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

.move-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.move-btn .icon {
  width: 11px;
  height: 11px;
}

/* ==========================================================================
   Bookings
   ========================================================================== */

.admin-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-card {
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--line);
}

.booking-card.is-new {
  border-left-color: var(--terra);
}

.booking-card.is-confirmed {
  border-left-color: var(--blue);
}

.booking-card.is-done {
  border-left-color: var(--green);
}

.booking-card.is-cancelled {
  border-left-color: var(--muted);
  opacity: 0.72;
}

.booking-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.booking-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--terra-soft);
  color: var(--terra-dark);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
}

.booking-person {
  min-width: 0;
}

.booking-person h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 4px;
}

.booking-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}

.booking-contact a {
  font-weight: 600;
  color: var(--ink-2);
  transition: color 0.2s ease;
}

.booking-contact a:hover {
  color: var(--terra);
}

.booking-head-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-select {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 0 28px 0 11px;
  font-size: 9px;
  font-weight: 600;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238a7469' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.booking-meta-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  min-width: 0;
}

.booking-meta-item span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.booking-meta-item strong {
  font-weight: 600;
  color: var(--ink-2);
}

.booking-comment {
  font-size: 10px;
  line-height: 1.65;
  color: var(--muted);
  background: var(--panel-soft);
  border-radius: 9px;
  padding: 9px 12px;
  margin-bottom: 12px;
}

.booking-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.booking-created {
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.booking-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.booking-actions .abtn {
  min-height: 32px;
  padding: 0 11px;
  font-size: 9px;
}

.booking-actions .icon-btn {
  width: 32px;
  height: 32px;
}

.booking-actions .icon-btn .icon {
  width: 13px;
  height: 13px;
}

/* ==========================================================================
   Settings
   ========================================================================== */

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.settings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.settings-card-head h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 3px;
}

.settings-card-head p {
  font-size: 9px;
  color: var(--muted);
}

.settings-card-body {
  padding: 20px 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
}

.settings-actions p {
  font-size: 9px;
  color: var(--muted);
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.backup-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.backup-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--terra-soft);
  color: var(--terra-dark);
}

.backup-box p {
  font-size: 10px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 12px;
}

.settings-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5ead8;
  color: #836334;
  font-size: 9px;
  line-height: 1.6;
  margin-top: 14px;
}

.settings-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  flex: 0 0 auto;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.admin-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.admin-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 14, 12, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.admin-modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s var(--ease);
  overflow: hidden;
}

.admin-modal-dialog > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.admin-modal.is-open .admin-modal-dialog {
  transform: translateY(0) scale(1);
}

.admin-modal-dialog.wide {
  max-width: 820px;
}

.admin-modal-dialog.small {
  max-width: 430px;
}

.admin-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.admin-modal-head .eyebrow {
  margin-bottom: 6px;
}

.admin-modal-head h2 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

.admin-modal-head p {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 5px;
}

.modal-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.modal-close:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.modal-close .icon {
  width: 14px;
  height: 14px;
}

.admin-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.admin-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.admin-modal-foot .form-error {
  margin-right: auto;
}

.form-error {
  font-size: 10px;
  line-height: 1.5;
  color: var(--red);
  min-height: 0;
}

.form-error:not(:empty) {
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--red-soft);
}

.form-hint {
  font-size: 9px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 8px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.modal-form-grid .full {
  grid-column: 1 / -1;
}

/* Upload */

.upload-zone {
  position: relative;
  display: block;
  min-height: 220px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--panel-soft);
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--terra);
  background: #f7ede3;
}

.upload-zone.is-loading {
  opacity: 0.6;
  pointer-events: none;
}

.upload-zone.has-image {
  border-style: solid;
}

.upload-preview {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.upload-placeholder {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.upload-placeholder .icon {
  width: 26px;
  height: 26px;
  color: var(--terra);
  margin-bottom: 3px;
}

.upload-placeholder strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.upload-placeholder span {
  font-size: 9px;
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px;
  background: linear-gradient(transparent 55%, rgba(30, 18, 15, 0.6));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.upload-zone:hover .upload-overlay {
  opacity: 1;
}

.upload-overlay span {
  color: var(--cream);
  font-size: 9px;
  font-weight: 600;
}

.upload-overlay .icon {
  width: 14px;
  height: 14px;
  color: var(--cream);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

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

.check-box {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.check-box .icon {
  width: 11px;
  height: 11px;
  color: var(--white, #fffaf4);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.check-row input:checked + .check-box {
  background: var(--terra);
  border-color: var(--terra);
}

.check-row input:checked + .check-box .icon {
  opacity: 1;
}

.check-row input:focus-visible + .check-box {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
}

.rating-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
}

.rating-picker button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: #d7c7bb;
  transition: color 0.15s ease, transform 0.15s var(--ease);
}

.rating-picker button .icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
}

.rating-picker button.is-active,
.rating-picker button:hover {
  color: var(--gold);
  transform: scale(1.08);
}

.confirm-dialog {
  max-width: 400px;
  text-align: center;
  padding: 30px;
}

.confirm-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
}

.confirm-icon .icon {
  width: 24px;
  height: 24px;
}

.confirm-dialog h2 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 8px;
}

.confirm-dialog p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 22px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ==========================================================================
   Icon picker (для раздела «Преимущества»)
   ========================================================================== */

.icon-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.icon-picker-btn {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.icon-picker-btn .icon {
  width: 22px;
  height: 22px;
}

.icon-picker-btn:hover {
  border-color: var(--terra);
  color: var(--terra);
}

.icon-picker-btn.is-active {
  background: var(--terra);
  border-color: var(--terra);
  color: var(--white, #fffaf4);
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--sidebar);
  color: var(--cream);
  font-size: 10px;
  line-height: 1.45;
  box-shadow: var(--shadow-md);
  border-left: 3px solid var(--terra);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s var(--ease), opacity 0.25s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.toast-error {
  border-left-color: var(--red);
}

.toast .icon {
  width: 15px;
  height: 15px;
  color: #d8a08e;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1240px) {
  .admin-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-table-head,
  .admin-service-row {
    grid-template-columns: 38px minmax(0, 1fr) 110px 85px 60px 140px;
  }
}

@media (max-width: 1100px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 36px 24px;
    overflow: hidden;
  }

  .login-panel::before {
    content: "";
    position: absolute;
    top: -140px;
    right: -100px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(216, 160, 142, 0.35), transparent 65%);
    pointer-events: none;
  }

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

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 266px;
    transform: translateX(-102%);
    transition: transform 0.4s var(--ease);
    box-shadow: 30px 0 80px rgba(0, 0, 0, 0.3);
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: grid;
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(24, 14, 12, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  .sidebar-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .admin-burger {
    display: grid;
  }

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

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .services-table-head {
    display: none;
  }

  .admin-service-row {
    grid-template-columns: 34px minmax(0, 1fr) 90px 110px;
  }

  .service-duration-cell {
    display: none;
  }

  .service-popular-cell {
    display: none;
  }

  .topbar-date {
    display: none;
  }
}

@media (max-width: 820px) {
  .admin-topbar {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 18px 12px;
    min-height: 72px;
  }

  .admin-content {
    padding: 22px 18px calc(48px + env(safe-area-inset-bottom, 0px));
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .toast-stack {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .topbar-title h1 {
    font-size: 26px;
  }

  .topbar-eyebrow {
    display: none;
  }

  .view-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .view-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .overview-greeting {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .overview-greeting h2 {
    font-size: 38px;
  }

  .overview-date {
    padding: 0;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-value {
    font-size: 30px;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

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

  .add-work-card {
    min-height: 160px;
  }

  .admin-work-actions {
    opacity: 1;
    transform: none;
  }

  .admin-service-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px 14px;
  }

  .service-price-cell {
    display: none;
  }

  .service-info strong {
    font-size: 19px;
  }

  .service-info small {
    white-space: normal;
  }

  .row-actions {
    gap: 4px;
  }

  .booking-card {
    padding: 16px;
  }

  .booking-card-head {
    flex-wrap: wrap;
  }

  .booking-head-side {
    width: 100%;
    margin-left: 0;
    padding-left: 56px;
    justify-content: flex-start;
  }

  .booking-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .booking-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .admin-review-head {
    flex-wrap: wrap;
  }

  .review-head-side {
    width: 100%;
    margin-left: 48px;
    justify-content: flex-start;
  }

  .admin-review-foot {
    flex-wrap: wrap;
  }

  .review-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .settings-card-body {
    padding: 16px;
  }

  .settings-card-head {
    padding: 15px 16px;
  }

  .settings-actions {
    padding: 14px 16px;
  }

  .form-grid,
  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    padding: 12px;
  }

  .admin-modal-dialog {
    max-height: calc(100vh - 24px);
  }

  .admin-modal-head {
    padding: 18px 18px 14px;
  }

  .admin-modal-head h2 {
    font-size: 27px;
  }

  .admin-modal-body {
    padding: 18px;
  }

  .admin-modal-foot {
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .admin-modal-foot .form-error {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .login-panel {
    align-items: flex-start;
    padding: calc(60px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px))
      calc(32px + env(safe-area-inset-bottom, 0px)) calc(18px + env(safe-area-inset-left, 0px));
  }

  .login-box h1 {
    font-size: 46px;
  }

  .login-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .topbar-avatar {
    display: none;
  }

  .admin-topbar {
    gap: 10px;
  }

  .view-title {
    font-size: 33px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    align-items: center;
  }

  .overview-greeting h2 {
    font-size: 33px;
  }

  .panel-head {
    padding: 15px 16px;
  }

  .panel-body {
    padding: 6px 16px 10px;
  }

  .works-toolbar {
    flex-wrap: wrap;
  }

  .search-field {
    max-width: none;
  }

  .admin-work-body h3 {
    font-size: 21px;
  }

  .admin-service-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .row-actions {
    grid-column: 2;
    justify-content: flex-start;
    padding-top: 4px;
  }

  .service-info small {
    display: none;
  }

  .booking-head-side {
    padding-left: 0;
  }

  .booking-avatar {
    width: 38px;
    height: 38px;
  }

  .booking-person h3 {
    font-size: 21px;
  }

  .review-head-side {
    margin-left: 0;
  }

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

  .settings-actions .abtn {
    width: 100%;
  }

  .confirm-actions {
    flex-direction: column-reverse;
  }

  .confirm-actions .abtn {
    width: 100%;
  }

  .icon-picker {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Motion
   ========================================================================== */

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