/* Admin area: sidebar layout, dashboard widgets and compact data tables. */

@keyframes admIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes growUp {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes drawRing {
  from { stroke-dashoffset: 330; }
  to { stroke-dashoffset: 0; }
}

body.admin {
  background: #f3f6f8;
}

/* =========================================================
   Shell
   ========================================================= */
.adm {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.adm__side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px 18px 18px;
  color: #b9c8cf;
  background: linear-gradient(180deg, #1a2a31 0%, #111c21 100%);
  z-index: 60;
}
.adm__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
}
.adm__brand img {
  width: 38px;
  height: 38px;
  padding: 5px;
  border-radius: 12px;
  background: #fff;
}
.adm__brand em {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ff9ccb;
  background: rgba(255, 62, 155, .16);
}
.adm__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm__navLabel {
  padding: 0 12px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6f848e;
}
.adm__nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  color: #a9bac2;
  transition: background .2s ease, color .2s ease;
}
.adm__nav a svg {
  width: 21px;
  height: 21px;
  flex: none;
}
.adm__nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.adm__nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 62, 155, .28), rgba(255, 62, 155, .08));
}
.adm__nav a.active::before {
  content: '';
  position: absolute;
  left: -18px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}
.adm__nav a.active svg {
  color: #ff7ab8;
}

.adm__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.adm__store {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  color: #a9bac2;
  border: 1px solid rgba(255, 255, 255, .1);
  transition: color .2s ease, border-color .2s ease;
}
.adm__store svg {
  width: 18px;
  height: 18px;
}
.adm__store:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
}
.adm__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
}
.adm__avatar,
.rlist__avatar {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff7ab8);
}
.adm__userText {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.adm__userText strong {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm__userText small {
  font-size: 12px;
  color: #7d909a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm__user button {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #a9bac2;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.adm__user button svg {
  width: 19px;
  height: 19px;
}
.adm__user button:hover {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

/* ---------- Top bar and content ---------- */
.adm__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.adm__top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 68px;
  padding: 0 32px;
  background: rgba(243, 246, 248, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #e3eaee;
}
.adm__crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.adm__crumb i {
  font-style: normal;
  opacity: .5;
}
.adm__crumb strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
}
.adm__visit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.adm__visit svg {
  width: 16px;
  height: 16px;
}
.adm__burger {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--stroke-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.adm__burger svg {
  width: 22px;
  height: 22px;
}
.adm__scrim {
  display: none;
}
.adm__content {
  width: 100%;
  max-width: 1320px;
  padding: 30px 32px 64px;
}

/* =========================================================
   Page header and shared pieces
   ========================================================= */
.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 26px;
  animation: admIn .5s ease both;
}
.pagehead h1 {
  margin: 4px 0 0;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  line-height: 1.1;
}
.pagehead p {
  margin: 8px 0 0;
  color: var(--muted);
}
.pagehead__date {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent3);
}
.pagehead__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.pagehead__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pagehead__actions svg {
  width: 17px;
  height: 17px;
}
.pagehead__stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 12px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e3eaee;
}
.pagehead__stat span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.pagehead__stat strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
}
.backlink {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent3);
}
.backlink:hover {
  color: var(--accent);
}

.notice {
  margin-bottom: 18px;
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0f5f55;
  background: #e6f7f3;
  border: 1px solid #bfe8df;
  animation: admIn .3s ease both;
}
.notice--error {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.panel {
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e3eaee;
  box-shadow: 0 6px 20px rgba(26, 42, 49, .04);
  animation: admIn .55s ease both;
}
.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel__head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.panel__head p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.panel__link {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent3);
  white-space: nowrap;
}
.panel__link:hover {
  color: var(--accent);
}
.panel__empty {
  margin: 8px 0 0;
  padding: 26px 16px;
  text-align: center;
  color: var(--muted);
  border-radius: 14px;
  background: #f7fafb;
}

/* =========================================================
   Dashboard
   ========================================================= */
.dash__row {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.dash__row--charts {
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
}
.dash__row--lists {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.kpis--compact {
  margin-bottom: 22px;
}
.kpi2 {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e3eaee;
  box-shadow: 0 6px 20px rgba(26, 42, 49, .04);
  animation: admIn .55s ease both;
  animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .25s ease, box-shadow .25s ease;
}
.kpi2:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(26, 42, 49, .1);
}
.kpi2__icon {
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
}
.kpi2__icon svg {
  width: 26px;
  height: 26px;
}
.kpi2--pink .kpi2__icon { color: #ff3e9b; background: rgba(255, 62, 155, .12); }
.kpi2--teal .kpi2__icon { color: #2f8a96; background: rgba(58, 139, 149, .13); }
.kpi2--violet .kpi2__icon { color: #8b5cf6; background: rgba(139, 92, 246, .13); }
.kpi2--amber .kpi2__icon { color: #d97706; background: rgba(245, 158, 11, .15); }
.kpi2__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.kpi2__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.kpi2__value {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.kpi2__note {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Sales chart */
.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.chart__grid {
  stroke: #e7eef1;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}
.chart__tick,
.chart__label {
  font-size: 12px;
  font-weight: 600;
  fill: #7d909a;
}
.chart__bar {
  fill: url(#bar);
  transform-box: fill-box;
  transform-origin: bottom;
  animation: growUp .7s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms + 150ms);
  transition: filter .2s ease;
}
.chart__hit {
  fill: transparent;
  transition: fill .2s ease;
}
.chart__col:hover .chart__hit {
  fill: rgba(255, 62, 155, .05);
}
.chart__col:hover .chart__bar {
  filter: brightness(1.06);
}

/* Order status ring */
.ring {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 6px 0 18px;
}
.ring svg {
  flex: none;
  width: 150px;
  height: 150px;
}
.ring__track {
  fill: none;
  stroke: #ffe1ef;
  stroke-width: 14;
}
.ring__done {
  fill: none;
  stroke: #ff3e9b;
  stroke-width: 14;
  stroke-linecap: round;
  animation: drawRing .9s ease both;
}
.ring__num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  fill: var(--text);
}
.ring__cap {
  font-size: 12px;
  font-weight: 600;
  fill: #7d909a;
}
.ring__legend {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}
.ring__legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ring__legend strong {
  margin-left: auto;
  padding-left: 14px;
  color: var(--text);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot--done { background: #ff3e9b; }
.dot--pending { background: #ffc4de; }

/* Recent orders / low stock lists */
.rlist {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rlist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid #edf2f4;
}
.rlist li:first-child {
  border-top: 0;
  padding-top: 4px;
}
.rlist__avatar {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #ffd0e6, #bfeee5);
  color: #1d2930;
}
.rlist__thumb {
  flex: none;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  color: #8aa0aa;
  background: #eef3f5;
}
.rlist__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rlist__thumb svg {
  width: 22px;
  height: 22px;
}
.rlist__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.rlist__main strong {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rlist__main small {
  font-size: 12.5px;
  color: var(--muted);
}
.rlist__amount {
  min-width: 70px;
  text-align: right;
  font-weight: 800;
  font-size: 14.5px;
}
.rlist__edit {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent3);
}
.rlist__edit:hover {
  color: var(--accent);
}

/* Status pills */
.pill2 {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.pill2--completed,
.pill2--ok { color: #0f7a4d; background: #e1f6ec; }
.pill2--pending,
.pill2--low { color: #b45309; background: #fdf0d8; }
.pill2--out { color: #b42318; background: #fde4e1; }
.pill2--muted { color: #5f7480; background: #eaf0f3; }

.dash-skel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.dash-skel .skeleton {
  height: 110px;
  border-radius: 22px;
}

/* =========================================================
   Tables
   ========================================================= */
.tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 5px;
  border-radius: 999px;
  background: #e8eef1;
}
.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.tabs__tab span {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(26, 42, 49, .08);
}
.tabs__tab:hover {
  color: var(--text);
}
.tabs__tab.is-active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 3px 10px rgba(26, 42, 49, .1);
}
.tabs__tab.is-active span {
  color: #fff;
  background: var(--accent);
}

.tablecard {
  overflow-x: auto;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e3eaee;
  box-shadow: 0 6px 20px rgba(26, 42, 49, .04);
  animation: admIn .55s ease both;
}
.tablecard__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
}
.tablecard__empty strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}
.dtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.dtable th {
  padding: 15px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7d909a;
  background: #f8fafb;
  border-bottom: 1px solid #e3eaee;
  white-space: nowrap;
}
.dtable td {
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #edf2f4;
}
.dtable tbody tr {
  transition: background .15s ease;
}
.dtable tbody tr:hover {
  background: #fafcfc;
}
.dtable tbody tr:last-child td {
  border-bottom: 0;
}
.dtable td > * {
  vertical-align: middle;
}
.tcell {
  min-width: 0;
}
.t-strong {
  display: block;
  font-weight: 800;
}
.t-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}
.t-clip {
  display: block;
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-num {
  text-align: right !important;
  font-weight: 800;
  white-space: nowrap;
}
.t-actions {
  text-align: right !important;
  width: 1%;
  white-space: nowrap;
}
.pcell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.pcell__thumb {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  overflow: hidden;
  color: #8aa0aa;
  background: #eef3f5;
}
.pcell__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pcell__text {
  min-width: 0;
}

/* Inline status / role dropdown that looks like a pill */
.status-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 14px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  transition: filter .2s ease;
}
.status-select:hover:not(:disabled) {
  filter: brightness(.96);
}
.status-select:disabled {
  opacity: .6;
  cursor: progress;
}
.status-select--completed {
  color: #0f7a4d;
  background-color: #e1f6ec;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f7a4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.status-select--pending {
  color: #b45309;
  background-color: #fdf0d8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.status-select--muted {
  color: #4c616c;
  background-color: #eaf0f3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234c616c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.row-actions {
  display: inline-flex;
  gap: 8px;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e3eaee;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn:hover {
  color: var(--accent3);
  border-color: var(--accent3);
  background: rgba(58, 139, 149, .06);
}
.icon-btn--danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(227, 91, 79, .07);
}

/* Category rows */
.inline-edit {
  display: flex;
  align-items: center;
  gap: 10px;
}
.inline-edit input {
  width: 100%;
  max-width: 320px;
  padding: 9px 12px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-weight: 800;
  color: var(--text);
  transition: border-color .2s ease, background .2s ease;
}
.inline-edit input:hover {
  background: #f4f7f9;
}
.inline-edit input:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
}

/* =========================================================
   Forms
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.formcard h2 {
  margin: 0;
  font-size: 1.15rem;
}
.formcard p {
  margin: 6px 0 18px;
  font-size: 14px;
  color: var(--muted);
}
.formcard .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.formcard .btn svg {
  width: 17px;
  height: 17px;
}
.formcard__stats {
  display: flex;
  gap: 18px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #edf2f4;
  font-size: 13.5px;
  color: var(--muted);
}
.formcard__stats strong {
  color: var(--text);
}

.afield {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.afield > span {
  font-size: 13px;
  font-weight: 800;
}
.afield input:not([type='file']):not([type='checkbox']),
.afield select,
.afield textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #dbe5e9;
  border-radius: 14px;
  background: #fbfdfd;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.afield textarea {
  resize: vertical;
  min-height: 120px;
}
.afield input[type='file'] {
  padding: 11px;
  border: 1.5px dashed #cbd8de;
  border-radius: 14px;
  background: #fbfdfd;
  font: inherit;
  font-size: 14px;
}
.afield input:focus,
.afield select:focus,
.afield textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 62, 155, .12);
}
.afield.has-error input,
.afield.has-error select,
.afield.has-error textarea {
  border-color: var(--danger);
}
.afield__error {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.pform {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.pform__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
}
.pform__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.pform__preview {
  position: sticky;
  top: 92px;
}
.pform__previewLabel {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7d909a;
}
.ppreview {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #e3eaee;
  box-shadow: 0 10px 26px rgba(26, 42, 49, .08);
}
.ppreview__img {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / .85;
  background: linear-gradient(160deg, #ffe9f3, #e4f7f3);
  color: rgba(58, 139, 149, .6);
  font-weight: 800;
  text-align: center;
}
.ppreview__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ppreview__img em {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, .92);
}
.ppreview__body {
  padding: 18px;
}
.ppreview__body h3 {
  margin: 0;
  font-size: 1.05rem;
}
.ppreview__body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.ppreview__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.ppreview__row strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .kpis,
  .dash-skel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash__row--charts,
  .dash__row--lists { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .adm {
    grid-template-columns: minmax(0, 1fr);
  }
  .adm__side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .3s ease, box-shadow .3s ease;
  }
  .adm__side.is-open {
    transform: none;
    box-shadow: 20px 0 50px rgba(0, 0, 0, .25);
  }
  .adm__scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    border: 0;
    background: rgba(14, 24, 30, .5);
  }
  .adm__burger {
    display: grid;
  }
  .adm__top {
    padding: 0 18px;
  }
  .adm__content {
    padding: 22px 18px 56px;
  }
  .split,
  .pform {
    grid-template-columns: minmax(0, 1fr);
  }
  .pform__preview {
    position: static;
  }
}
@media (max-width: 760px) {
  .kpis,
  .dash-skel { grid-template-columns: minmax(0, 1fr); }
  .adm__visit { display: none; }
  .ring { flex-direction: column; align-items: flex-start; }
  .pform__grid { grid-template-columns: minmax(0, 1fr); }
  .tabs { display: flex; overflow-x: auto; }

  /* Tables turn into stacked cards on small screens */
  .tablecard { overflow: visible; background: transparent; border: 0; box-shadow: none; }
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable thead { display: none; }
  .dtable tr {
    margin-bottom: 14px;
    padding: 6px 4px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e3eaee;
  }
  .dtable td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    border-bottom: 0;
    text-align: right;
  }
  .dtable td::before {
    content: attr(data-label);
    flex: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #7d909a;
  }
  .dtable td .pcell, .dtable td > .t-strong, .dtable td > .t-clip { text-align: left; }
  .dtable td .t-clip {
    max-width: none;
    white-space: normal;
    text-align: right;
  }
  .dtable td .tcell { text-align: right; }
  .dtable td .t-strong, .dtable td .t-sub { text-align: right; }
  .dtable td .pcell { flex: 1; justify-content: flex-start; }
  .dtable td .pcell .t-strong, .dtable td .pcell .t-sub { text-align: left; }
  .t-num, .t-actions { width: 100%; }
  .rlist__edit { display: none; }
  .rlist li { gap: 10px; }
  .rlist__amount { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chart__bar, .ring__done { animation: none; }
}
