:root {
  color-scheme: light;
  --ink: #211914;
  --muted: #71685f;
  --line: #ded8cf;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --brand: #33220c;
  --gold: #c98a1f;
  --green: #1d7a55;
  --blue: #315c72;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  min-height: 38px;
  padding: 0 14px;
  font-weight: 750;
  border-radius: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button:hover {
  background: #4b3212;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input,
textarea {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
  border-radius: 6px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 138, 31, 0.1);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  min-width: 160px;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.topnav {
  display: inline-flex;
  border: 1px solid var(--line);
  background: #f4efe6;
}

.nav-tab {
  background: transparent;
  color: var(--muted);
  min-height: 36px;
}

.nav-tab:hover,
.nav-tab[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}

.api-form {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 620px);
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.toolbar p,
.muted {
  color: var(--muted);
  margin-top: 5px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 150px auto;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.order-filters {
  grid-template-columns: minmax(180px, 1fr) 140px 130px auto;
  margin-bottom: 12px;
}

.order-overview {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.order-overview button,
.order-overview-card {
  min-height: 68px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
  display: grid;
  align-content: center;
  gap: 2px;
}

.order-overview button[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: inset 0 -3px 0 var(--gold);
}

.order-overview strong {
  font-size: 18px;
  line-height: 1.05;
}

.order-overview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.order-overview-card.is-danger strong {
  color: #a93428;
}

.content-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.workshop-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 10px;
  text-align: left;
  color: var(--ink);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.workshop-item:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.workshop-item[aria-selected="true"] {
  border-color: var(--gold);
  box-shadow: inset 4px 0 0 var(--gold);
}

.thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f4efe6;
  border-radius: 6px;
}

.workshop-item strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  border: 1px solid #e4d8c7;
  background: #fff8ed;
  color: #65440d;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 750;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: var(--gold);
  background: #fff7e8;
}

.detail {
  min-height: 620px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 340px;
  min-height: 280px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
}

.hero-copy {
  padding: 24px;
}

.hero-copy h2 {
  font-size: 34px;
  line-height: 1.05;
  margin-bottom: 10px;
  letter-spacing: -0.8px;
}

.hero-photo {
  min-height: 280px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f4efe6;
  border-radius: 0 8px 0 0;
}

.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.info-row span,
.info-link {
  border: 1px solid var(--line);
  padding: 7px 9px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.info-link {
  border-color: #b6d9ca;
  color: var(--green);
  background: #edf8f3;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  padding: 20px;
}

.panel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.panel:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.panel h2 {
  font-size: 18px;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

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

.gallery-item {
  aspect-ratio: 4 / 3;
  position: relative;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #f4efe6;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.gallery-item:hover {
  border-color: var(--gold);
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(33, 25, 20, .78);
  color: #fff;
  font-size: 12px;
  padding: 6px;
}

.contact-card {
  border: 1px solid var(--line);
  padding: 14px;
  background: #fbfaf7;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.contact-card:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.contact-card form {
  display: grid;
  gap: 9px;
}

.contact-lines {
  display: grid;
  gap: 6px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contact-lines a {
  color: var(--green);
  text-decoration: none;
}

.form-status {
  min-height: 20px;
  color: var(--green);
  font-weight: 750;
  font-size: 13px;
}

.empty {
  border: 1px dashed var(--line);
  background: #fff;
  padding: 22px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  border-radius: 8px;
  text-align: center;
}

.is-hidden {
  display: none !important;
}

.admin-login,
.atelier-login {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px auto;
  gap: 8px;
}

.admin-grid,
.atelier-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar,
.admin-main,
.atelier-sidebar,
.atelier-main {
  display: grid;
  gap: 14px;
}

.workspace-main {
  display: grid;
  gap: 14px;
}

.sidebar-menu {
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 8px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-menu strong {
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-menu a,
.sidebar-menu button {
  border: 1px solid var(--line);
  color: var(--brand);
  text-decoration: none;
  font-weight: 850;
  padding: 9px 10px;
  background: #fbfaf7;
  text-align: left;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu button:hover,
.sidebar-menu button.is-active {
  border-color: var(--gold);
  background: #fff7e8;
  transform: translateX(2px);
}

.admin-section,
.atelier-section {
  display: grid;
  gap: 14px;
}

.admin-section.is-hidden,
.atelier-section.is-hidden,
.atelier-client-detail.is-hidden,
#atelier-client-list.is-hidden {
  display: none;
}

.directory-list-mode .detail,
.directory-detail-mode .results,
.directory-detail-mode .vitrine-stats,
.directory-detail-mode .vitrine-filters {
  display: none;
}

.directory-list-mode .content-grid,
.directory-detail-mode .content-grid {
  display: block;
}

.public-back {
  margin: 0 0 14px;
}

.section-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.admin-body-list {
  max-height: none;
  overflow: visible;
}

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

.admin-layout .admin-sidebar {
  background: #332006;
  color: #fff7e8;
  padding: 18px;
  min-height: calc(100vh - 118px);
  align-content: start;
  border-radius: 8px 0 0 8px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.admin-layout .sidebar-menu {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 5px;
}

.admin-layout .sidebar-menu strong {
  color: #b99662;
  font-size: 14px;
  letter-spacing: .03em;
  margin: 15px 0 6px;
}

.admin-layout .sidebar-menu strong:first-child {
  margin-top: 0;
}

.admin-layout .sidebar-menu a,
.admin-layout .sidebar-menu button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #f4eadb;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 11px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.admin-layout .sidebar-menu a:hover,
.admin-layout .sidebar-menu a.is-active,
.admin-layout .sidebar-menu button:hover,
.admin-layout .sidebar-menu button.is-active {
  background: #543505;
  color: var(--gold);
  transform: translateX(4px);
}

.admin-layout .sidebar-menu em {
  background: var(--gold);
  color: #2b1b05;
  font-style: normal;
  min-width: 30px;
  padding: 3px 7px;
  text-align: center;
}

.admin-layout .admin-sidebar .admin-card,
.admin-layout .admin-sidebar .filters,
.admin-layout .admin-sidebar .results {
  background: #fffaf2;
  color: var(--ink);
}

.admin-layout #admin-metrics.metric-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.admin-kpi-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(42, 27, 7, .10);
  position: relative;
}

.admin-kpi-card::before {
  background: var(--gold);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.admin-kpi-card.accent-blue::before {
  background: var(--blue);
}

.admin-kpi-card.accent-green::before {
  background: var(--green);
}

.admin-kpi-card.accent-purple::before {
  background: #8b5cf6;
}

.admin-kpi-card em {
  color: var(--green);
  display: block;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  margin-top: 10px;
}

.admin-dashboard-extra {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .95fr);
  gap: 16px;
}

.admin-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(42, 27, 7, .08);
  display: grid;
  gap: 14px;
  padding: 20px;
}

.admin-panel h3 {
  margin: 0;
}

.admin-panel p {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0;
}

.admin-panel p span {
  color: var(--muted);
}

.admin-chart-panel {
  min-height: 260px;
}

.mini-bar-chart {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, 1fr);
  min-height: 190px;
}

.mini-bar-chart span {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 8px;
  justify-items: center;
}

.mini-bar-chart i {
  align-self: end;
  background: linear-gradient(180deg, var(--gold), #f9d68a);
  display: block;
  height: var(--height);
  width: 100%;
}

.mini-bar-chart strong {
  color: var(--muted);
}

.donut-row {
  align-items: center;
  display: flex;
  gap: 22px;
}

.donut {
  align-items: center;
  background: conic-gradient(var(--gold) 0 40%, #2b1b05 40% 70%, var(--blue) 70% 90%, #8b5cf6 90% 100%);
  border-radius: 50%;
  display: grid;
  height: 138px;
  justify-items: center;
  width: 138px;
}

.donut strong {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  display: grid;
  height: 96px;
  justify-items: center;
  width: 96px;
}

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

.legend-list span {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 9px;
  font-weight: 750;
}

.legend-list i {
  background: var(--gold);
  border-radius: 50%;
  height: 12px;
  width: 12px;
}

.legend-list .legend-1 {
  background: #2b1b05;
}

.legend-list .legend-2 {
  background: var(--blue);
}

.legend-list .legend-3 {
  background: #8b5cf6;
}

.ok-text {
  color: var(--green);
}

.danger-text {
  color: #e02222;
}

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

.metric {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.metric:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-workshop,
.client-item,
.admin-user-row,
.admin-subscription-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  text-align: left;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.admin-user-row {
  align-items: stretch;
}

.admin-user-row summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 40px minmax(180px, 1fr) minmax(180px, 1fr) minmax(160px, auto);
  list-style: none;
}

.admin-user-row summary::-webkit-details-marker {
  display: none;
}

.user-avatar {
  align-items: center;
  background: #fff7e8;
  border: 1px solid rgba(201, 138, 31, 0.2);
  border-radius: 999px;
  color: var(--gold);
  display: inline-flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.admin-user-row[open] {
  gap: 14px;
}

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

.admin-workshop:hover,
.client-item:hover,
.admin-user-row:hover,
.admin-subscription-row:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-subscription-row {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 260px) minmax(260px, 1fr) auto;
}

.admin-revenue-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, auto)) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.responsive-table {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

.data-table th {
  background: #f8f3ea;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table tbody tr:nth-child(4n + 1),
.data-table tbody tr:nth-child(4n + 2) {
  background: #fff;
  transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
  background: #f8f3ea;
}

.data-table tbody tr:nth-child(4n + 3),
.data-table tbody tr:nth-child(4n + 4) {
  background: #fbfaf7;
}

.data-table tr.is-late td:first-child {
  border-left: 4px solid #a93428;
}

.data-table tr.is-selected td:first-child {
  border-left: 4px solid var(--gold);
}

.data-table td strong,
.data-table td .muted {
  display: block;
}

.table-detail-row td {
  padding-top: 0;
}

.order-detail-panel {
  display: grid;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.order-detail-view {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

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

.cash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

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

.reminder-panel {
  align-content: start;
}

.compact-list .admin-row {
  padding: 10px;
}

.detail-panel {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-panel h3 {
  font-size: 18px;
}

.finance-cell {
  display: grid;
  gap: 3px;
  text-align: right;
}

.finance-cell strong {
  font-size: 15px;
}

.finance-cell small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-cell.is-danger strong {
  color: #a93428;
}

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

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

.analytics-row span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.analytics-row strong {
  font-size: 14px;
}

.analytics-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 850;
}

.analytics-row i {
  display: block;
  height: 7px;
  background: var(--gold);
}

.list-main {
  display: grid;
  gap: 4px;
}

.list-meta {
  justify-content: flex-end;
}

.admin-workshop[aria-selected="true"],
.client-item[aria-selected="true"] {
  border-color: var(--blue);
  box-shadow: inset 4px 0 0 var(--blue);
}

.admin-workshop strong,
.client-item strong,
.admin-user-row strong,
.admin-subscription-row strong {
  font-size: 15px;
  letter-spacing: -0.2px;
}

.compact-grid {
  grid-template-columns: minmax(130px, 1fr) auto;
}

.module-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-checks label {
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: inline-flex;
  gap: 5px;
  padding: 5px 7px;
  font-size: 12px;
  font-weight: 800;
}

.module-checks input {
  min-height: auto;
  width: auto;
}

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

.pill {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.pill.ok {
  border-color: #b6d9ca;
  background: #edf8f3;
  color: var(--green);
}

.pill.ok:hover {
  background: #d4f0e6;
}

.admin-card {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-card h2,
.admin-card h3 {
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details.admin-card[open] summary {
  margin-bottom: 12px;
}

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

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

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

.field label,
.check-row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.check-row input {
  width: auto;
  min-height: auto;
}

select {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  padding: 8px 10px;
  width: 100%;
  font: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 138, 31, 0.1);
}

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

.admin-row {
  border: 1px solid var(--line);
  background: #fbfaf7;
  padding: 12px;
  display: grid;
  gap: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.audit-search {
  align-items: center;
  grid-template-columns: minmax(220px, 1fr) auto auto;
}

.audit-tabs {
  overflow-x: auto;
}

.audit-row {
  align-items: center;
  grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) minmax(140px, 0.7fr) minmax(220px, 1.4fr);
}

.audit-row code,
.audit-message strong {
  overflow-wrap: anywhere;
}

.error-log-row {
  grid-template-columns: 70px minmax(220px, 1.4fr) minmax(140px, 0.8fr) minmax(220px, 1.6fr);
}

.status-dot {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
}

.status-dot.danger {
  background: #ffe9e7;
  color: #b42318;
}

.status-dot.warning {
  background: #fff7e8;
  color: #8a5a00;
}

.status-dot.neutral {
  background: #eef4ff;
  color: #175cd3;
}

.admin-row:hover {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.order-row {
  border-left: 4px solid var(--gold);
}

.admin-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #f4efe6;
  border: 1px solid var(--line);
}

.client-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.client-summary span {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
}

.client-summary button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

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

[data-admin-panel="releases"] .admin-list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

[data-admin-panel="releases"] .release-edit-form {
  flex: 0 0 100%;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

[data-admin-panel="releases"] .release-edit-form.is-hidden {
  display: none;
}

[data-admin-panel="releases"] .admin-list-row > div:first-child {
  min-width: 0;
  flex: 1;
}

[data-admin-panel="releases"] .pill.warning {
  border-color: #d99822;
  background: #fff6df;
  color: #704409;
}

[data-admin-panel="releases"] .pill.success {
  border-color: #2f855a;
  background: #ecfdf3;
  color: #14532d;
}

@media (max-width: 760px) {
  [data-admin-panel="releases"] .admin-list-row {
    align-items: stretch;
    flex-direction: column;
  }
}

.command-actions {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.order-row {
  gap: 10px;
}

.order-row.is-late {
  border-left: 4px solid #a93428;
}

.order-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.order-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.order-facts span {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: grid;
  gap: 3px;
  padding: 8px;
  font-size: 12px;
  font-weight: 750;
}

.order-facts strong {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
}

.order-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill.warn {
  border-color: #f0d08a;
  background: #fff7df;
  color: #775105;
}

.pill.warn:hover {
  background: #fff0d0;
}

.pill.danger {
  border-color: #e4b1aa;
  background: #fff0ee;
  color: #a93428;
}

.pill.danger:hover {
  background: #ffe0e0;
}

.payment-form input,
.payment-form select,
.agent-pin-form input {
  width: auto;
  min-width: 140px;
}

.file-field {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 6px;
  padding: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.file-field input {
  padding: 0;
  min-height: auto;
}

.form-section {
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
}

.form-section legend {
  color: var(--ink);
  font-weight: 850;
  padding: 0 6px;
}

.order-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 150px));
  gap: 8px;
}

.order-photos a {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  display: grid;
  gap: 5px;
  padding: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.order-photos a:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.order-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f4efe6;
  border-radius: 4px;
}

.measurement-panel {
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
  border-radius: 8px;
}

.measurement-panel summary {
  margin-bottom: 10px;
}

.measurement-group {
  border: 1px solid #ece4d9;
  background: #fbfaf7;
  margin: 0 0 10px;
  padding: 10px;
  border-radius: 6px;
}

.measurement-group legend {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  padding: 0 6px;
}

.measurements-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.measurements-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.measurements-grid input {
  min-width: 0;
}

.secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
}

.secondary:hover {
  background: #f4efe6;
  border-color: var(--gold);
}

.danger {
  background: #8d2e22;
}

.danger:hover {
  background: #6f2017;
  box-shadow: 0 2px 8px rgba(141, 46, 34, 0.3);
}

.contact-message {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 980px) {
  .topbar,
  .toolbar,
  .content-grid,
  .hero,
  .detail-body,
  .admin-grid,
  .atelier-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    height: auto;
    align-items: stretch;
    padding: 14px;
  }

  .api-form,
  .filters,
  .admin-login,
  .atelier-login {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 14px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }

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

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

  .payment-form input,
  .payment-form select,
  .agent-pin-form input,
  .row-actions button {
    width: 100%;
  }

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

  .admin-layout .admin-sidebar {
    min-height: auto;
    border-radius: 8px;
  }

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

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

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

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

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

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

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .vitrine-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .vitrine-filters {
    padding: 12px 16px;
  }

  .directory .toolbar {
    padding: 32px 20px;
  }

  .directory .toolbar h1 {
    font-size: 32px;
  }

  .directory .filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    gap: 12px;
  }

  .topnav {
    width: 100%;
    justify-content: center;
  }

  .nav-tab {
    flex: 1;
    font-size: 12px;
    padding: 0 8px;
  }

  .toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .toolbar h1 {
    font-size: 22px;
  }

  .directory .toolbar h1 {
    font-size: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-photo {
    min-height: 200px;
    border-radius: 8px 8px 0 0;
  }

  .hero-copy {
    padding: 16px;
  }

  .hero-copy h2 {
    font-size: 24px;
  }

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

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

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

  .admin-sidebar,
  .atelier-sidebar {
    min-height: auto;
  }

  .sidebar-menu {
    overflow-x: auto;
  }

  .sidebar-menu button {
    white-space: nowrap;
  }

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

  .order-facts {
    grid-template-columns: 1fr;
  }

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

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

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

  .order-photos {
    grid-template-columns: 1fr;
  }

  .data-table {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 6px;
  }

  .chip,
  .pill {
    font-size: 11px;
    padding: 3px 6px;
  }

  .vitrine-filters button {
    font-size: 11px;
    padding: 0 12px;
  }

  .filters {
    padding: 10px;
  }

  .filters input,
  .filters button {
    min-height: 36px;
  }

  button {
    min-height: 36px;
    font-size: 13px;
  }

  input,
  select,
  textarea {
    min-height: 36px;
    font-size: 14px;
  }

  .admin-card,
  .contact-card,
  .detail-panel,
  .measurement-panel {
    padding: 12px;
  }

  .workshop-item {
    grid-template-columns: 60px 1fr;
    padding: 8px;
  }

  .thumb {
    width: 60px;
    height: 60px;
  }

  .info-row {
    flex-direction: column;
    gap: 6px;
  }

  .info-row span,
  .info-link {
    width: 100%;
  }

  .row-actions {
    flex-direction: column;
    width: 100%;
  }

  .row-actions button {
    width: 100%;
  }

  .admin-workshop,
  .client-item,
  .admin-user-row,
  .admin-subscription-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-revenue-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-heading button {
    width: 100%;
  }

  .donut-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .mini-bar-chart {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .cash-grid,
  .reminder-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .vitrine-stats {
    flex-direction: column;
    gap: 12px;
    padding: 20px 16px;
  }

  .vitrine-filters {
    padding: 10px 16px;
    min-height: auto;
    flex-wrap: wrap;
  }

  .vitrine-filters button {
    flex: 1 1 auto;
    min-width: 80px;
  }

  .directory .toolbar {
    padding: 24px 16px;
    min-height: auto;
  }

  .directory .toolbar::before {
    width: 120px;
    height: 120px;
    right: 16px;
    top: 16px;
  }

  .directory .toolbar h1 {
    font-size: 24px;
  }

  .directory .toolbar p {
    font-size: 14px;
  }

  .directory .filters {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .directory .filters button {
    width: 100%;
  }

  .shell {
    padding: 12px;
  }

  .empty {
    padding: 16px;
  }

  .contact-lines {
    font-size: 12px;
  }

  .gallery-item span {
    font-size: 11px;
    padding: 4px;
  }

  .legend-list {
    font-size: 12px;
  }

  .legend-list i {
    width: 10px;
    height: 10px;
  }

  .analytics-row strong {
    font-size: 13px;
  }

  .analytics-row em {
    font-size: 11px;
  }
}

/* Maquette alignment */
:root {
  --brand: #2d1b00;
  --gold: #e8a838;
  --paper: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c1c1c;
  --muted: #71685f;
  --line: #e5ded4;
  --blue: #3b82f6;
  --green: #22c55e;
}

body {
  background: var(--paper);
}

button {
  border-radius: 7px;
  background: var(--brand);
  font-weight: 800;
}

button:hover {
  background: #4a2e00;
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

input,
textarea,
select {
  border-radius: 7px;
  border-color: #ddd3c5;
}

.topbar {
  height: 60px;
  background: var(--brand);
  border-bottom: 0;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  flex-wrap: wrap;
}

.brand {
  color: var(--gold);
  letter-spacing: 0;
}

.brand img {
  width: 38px;
  height: 38px;
}

.topnav {
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .06);
  border-radius: 8px;
  padding: 3px;
}

.nav-tab {
  border-radius: 6px;
  color: #d6c9b8;
  min-height: 32px;
  padding: 0 16px;
  font-size: 13px;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.nav-tab[aria-pressed="true"] {
  background: var(--gold);
  color: var(--brand);
}

.api-form {
  grid-template-columns: auto minmax(220px, 330px) auto;
  color: #d6c9b8;
}

.api-form input {
  min-height: 32px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  border-color: rgba(255, 255, 255, .14);
}

.api-form button {
  min-height: 32px;
  background: var(--gold);
  color: var(--brand);
}

.shell {
  width: 100%;
  padding: 0;
}

.directory .toolbar {
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, 560px);
  align-items: center;
  min-height: 310px;
  margin: 0;
  padding: 56px 40px;
  background: linear-gradient(135deg, #2d1b00 0%, #4a2e00 62%, #2d1b00 100%);
}

.directory .toolbar::before {
  content: "";
  position: absolute;
  right: 48px;
  top: 18px;
  width: 220px;
  height: 220px;
  background: url("/assets/atelierpro-logo.png") center / contain no-repeat;
  opacity: .08;
}

.directory .toolbar h1 {
  max-width: 640px;
  color: #fff;
  font-size: 42px;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -1px;
}

.directory .toolbar h1 span {
  color: var(--gold);
}

.directory .toolbar p {
  color: #d6c9b8;
  font-size: 16px;
  margin-top: 12px;
  line-height: 1.5;
}

.directory .filters {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(190px, 1fr) 120px auto;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 7px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
}

.directory .filters input {
  border: 0;
  min-height: 42px;
}

.directory .filters button {
  min-height: 42px;
  background: var(--gold);
  color: var(--brand);
}

.vitrine-stats {
  display: flex;
  gap: 34px;
  padding: 0 40px 38px;
  background: linear-gradient(135deg, #2d1b00 0%, #4a2e00 62%, #2d1b00 100%);
  color: #d6c9b8;
}

.vitrine-stats span {
  display: grid;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
}

.vitrine-stats strong {
  color: var(--gold);
  font-size: 26px;
  line-height: 1;
}

.vitrine-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px 40px;
  background: #fff;
  border-bottom: 1px solid #ece6dd;
  color: #8a8075;
  font-size: 13px;
  font-weight: 800;
  overflow-x: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.vitrine-filters button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid #e2dbd1;
  background: #fff;
  color: #67605a;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.vitrine-filters button:hover {
  border-color: var(--gold);
  color: var(--brand);
  transform: translateY(-1px);
}

.vitrine-filters button:first-of-type,
.vitrine-filters button:hover {
  background: var(--brand);
  color: var(--gold);
  border-color: var(--brand);
}

.content-grid {
  display: block;
  padding: 28px 40px;
}

#public-view .results {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
}

.workshop-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: transform .2s, box-shadow .2s;
}

.workshop-item:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.workshop-item[aria-selected="true"] {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--gold), 0 8px 24px rgba(0, 0, 0, .12);
}

.thumb {
  width: 100%;
  height: 170px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(135deg, var(--brand), #4a2e00);
}

.vitrine-card-media {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #5a3300, #1d625c);
}

.verified-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--brand);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 950;
}

.vitrine-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #fff;
}

.vitrine-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.vitrine-card-actions span {
  min-height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.vitrine-card-actions .whatsapp-action {
  background: #22c55e;
}

.detail {
  margin-top: 28px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}

.workshop-profile-hero {
  position: relative;
  min-height: 340px;
  background: var(--brand);
  overflow: hidden;
}

.profile-cover {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  opacity: .78;
}

.profile-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 34px;
  background: linear-gradient(180deg, rgba(45, 27, 0, .18), rgba(45, 27, 0, .92));
  color: #fff;
}

.profile-logo {
  width: 96px;
  height: 96px;
  object-fit: contain;
  background: #fff;
  border: 3px solid var(--gold);
  border-radius: 12px;
  padding: 8px;
}

.profile-title {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-title h2 {
  font-size: 40px;
  line-height: 1;
}

.profile-title p {
  max-width: 720px;
  color: #eadcca;
  line-height: 1.45;
}

.verified-badge.inline {
  position: static;
  width: max-content;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 150px;
}

.profile-actions a {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 18px;
  border-radius: 7px;
  background: var(--gold);
  color: var(--brand);
  text-decoration: none;
  font-weight: 950;
}

.profile-actions .whatsapp-action {
  background: #22c55e;
  color: #fff;
}

.profile-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.profile-summary-band div {
  padding: 16px 20px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 3px;
}

.profile-summary-band div:last-child {
  border-right: 0;
}

.profile-summary-band strong {
  color: var(--brand);
  font-size: 22px;
  line-height: 1;
}

.profile-summary-band span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-body {
  align-items: start;
}

.profile-main {
  display: grid;
  gap: 16px;
}

.profile-section {
  border: 1px solid var(--line);
  background: #fff;
  padding: 16px;
  border-radius: 10px;
}

.profile-section h3 {
  margin-bottom: 12px;
}

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

.profile-info-grid span,
.hours-grid span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  background: #fbfaf7;
  padding: 10px;
  color: var(--muted);
  font-weight: 750;
}

.profile-info-grid strong,
.hours-grid strong {
  color: var(--ink);
  text-transform: capitalize;
  font-size: 12px;
}

.profile-gallery {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero {
  background: var(--brand);
  border-bottom: 0;
}

.hero-copy h2 {
  color: #fff;
}

.hero-copy .muted {
  color: #d6c9b8;
}

.info-row span,
.info-link,
.contact-card,
.admin-card,
.metric,
.admin-row,
.empty {
  border-radius: 10px;
}

.chip,
.pill {
  border-radius: 999px;
}

.admin-layout,
.atelier-layout {
  min-height: calc(100vh - 60px);
  background: #f0f2f5;
  padding: 20px 24px;
}

.admin-layout > .toolbar,
.atelier-layout > .toolbar {
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 620px);
  padding: 0;
  margin-bottom: 16px;
}

.admin-layout h1,
.atelier-layout h1 {
  font-size: 18px;
  font-weight: 900;
}

.admin-grid,
.atelier-grid {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
}

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

.admin-sidebar,
.atelier-sidebar {
  align-content: start;
}

.admin-card,
.metric,
.admin-row,
.client-item,
.admin-workshop,
.admin-user-row,
.admin-subscription-row {
  border: 0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.metric {
  border-left: 4px solid var(--gold);
}

.metric:nth-child(2) {
  border-left-color: var(--blue);
}

.metric:nth-child(3) {
  border-left-color: var(--green);
}

.metric:nth-child(4) {
  border-left-color: #8b5cf6;
}

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

.admin-workshop,
.client-item,
.admin-user-row,
.admin-subscription-row {
  border-radius: 10px;
}

.admin-workshop[aria-selected="true"],
.client-item[aria-selected="true"] {
  box-shadow: inset 4px 0 0 var(--gold), 0 1px 3px rgba(0, 0, 0, .06);
  border-color: transparent;
}

.admin-list {
  gap: 10px;
}

.audit-pager {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.audit-pager button {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font: inherit;
  font-weight: 850;
  padding: 8px 12px;
  border-radius: 6px;
}

.audit-pager button:not(:disabled):hover {
  border-color: var(--gold);
  background: #fff7e8;
}

.audit-pager button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 900px) {
  .audit-search {
    grid-template-columns: 1fr;
  }

  .audit-row,
  .error-log-row {
    grid-template-columns: 1fr;
  }
}

.secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid #ded8cf;
}

.secondary:hover {
  background: #fff7e8;
}

.danger {
  background: #dc2626;
}

.danger:hover {
  background: #b91c1c;
}

.form-status {
  color: var(--green);
}

@media (max-width: 980px) {
  .topbar {
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .brand {
    min-width: 0;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-tab {
    padding: 0 8px;
  }

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

  .directory .toolbar {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 34px 16px;
  }

  .directory .toolbar h1 {
    font-size: 32px;
  }

  .directory .filters {
    grid-template-columns: 1fr;
  }

  .profile-overlay {
    position: relative;
    grid-template-columns: 1fr;
    padding: 20px;
    background: var(--brand);
  }

  .profile-cover {
    height: 220px;
  }

  .profile-title h2 {
    font-size: 30px;
  }

  .profile-actions,
  .profile-summary-band,
  .profile-info-grid,
  .hours-grid,
  .profile-gallery {
    grid-template-columns: 1fr;
  }

  .profile-summary-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .vitrine-stats {
    padding: 0 16px 24px;
    gap: 18px;
    flex-wrap: wrap;
  }

  .vitrine-filters {
    padding: 10px 16px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    padding: 18px 14px;
  }

  .order-overview,
  .order-filters,
  .order-facts,
  .admin-layout #admin-metrics.metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-title-row {
    display: grid;
  }

  .responsive-table {
    overflow: visible;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    border: 1px solid var(--line);
    margin-bottom: 10px;
  }

  .data-table td {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--line);
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .table-detail-row td {
    display: block;
  }

  .table-detail-row td::before {
    content: "";
    display: none;
  }

  .admin-workshop,
  .client-item,
  .admin-subscription-row,
  .admin-revenue-row,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-user-row summary {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .admin-user-row summary .list-main,
  .admin-user-row summary .list-meta {
    grid-column: 2;
  }

  .admin-user-row .form-grid,
  .admin-user-create-form .form-grid,
  .admin-agent-pin-form {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    justify-content: stretch;
  }

  .admin-user-actions button {
    flex: 1 1 160px;
  }

  .finance-cell {
    text-align: left;
  }

  .list-meta {
    justify-content: flex-start;
  }

  .admin-layout .admin-grid,
  .admin-dashboard-extra,
  .admin-analytics-grid,
  .order-detail-grid,
  .cash-grid,
  .reminder-grid {
    grid-template-columns: 1fr;
  }

  .admin-layout .admin-sidebar {
    min-height: auto;
  }

  .admin-layout,
  .atelier-layout {
    padding: 14px;
  }
}
