:root {
  --bg: #f3f6f4;
  --panel: #ffffff;
  --panel-soft: #f8faf9;
  --ink: #101411;
  --muted: #69756e;
  --line: #dfe7e2;
  --green: #006b35;
  --green-dark: #062f1c;
  --green-soft: #e8f6ee;
  --yellow: #f7c70f;
  --danger: #c93434;
  --shadow: 0 22px 55px rgba(12, 28, 20, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body.admin-theme-dark {
  --bg: #090b0a;
  --panel: #121514;
  --panel-soft: #181d1b;
  --ink: #f6f7f5;
  --muted: #a7b0aa;
  --line: #29302d;
  --green: #00a858;
  --green-dark: #072818;
  --green-soft: rgba(0, 168, 88, .14);
  --yellow: #f7c70f;
  --shadow: 0 22px 55px rgba(0, 0, 0, .34);
}

body.admin-theme-classic {
  --bg: #f4f7f3;
  --panel: #ffffff;
  --panel-soft: #eef5ef;
  --ink: #101511;
  --muted: #657368;
  --line: #d9e4db;
  --green: #007a3d;
  --green-dark: #064024;
  --green-soft: #e6f5ec;
  --yellow: #d2a900;
  --shadow: 0 22px 55px rgba(20, 60, 32, .10);
}

body.admin-theme-minimal {
  --bg: #fbfbfa;
  --panel: #ffffff;
  --panel-soft: #f7f3e8;
  --ink: #17130d;
  --muted: #746c60;
  --line: #e3ded3;
  --green: #17130d;
  --green-dark: #0b0a08;
  --green-soft: #f4efe4;
  --yellow: #b6932f;
  --shadow: 0 22px 55px rgba(23, 19, 13, .10);
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 107, 53, .16), transparent 34%),
    linear-gradient(135deg, #edf5f0 0%, #fbfcfb 58%, #eef3ef 100%);
}

body.admin-theme-dark .login-screen {
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 168, 88, .18), transparent 34%),
    linear-gradient(135deg, #050605 0%, #101513 58%, #070908 100%);
}

body.admin-theme-classic .login-screen,
body.admin-theme-minimal .login-screen {
  background:
    radial-gradient(circle at 18% 20%, rgba(182, 147, 47, .12), transparent 34%),
    linear-gradient(135deg, var(--bg) 0%, #fff 58%, var(--panel-soft) 100%);
}

.login-shell {
  width: min(1120px, 100%);
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 420px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(8, 43, 24, .08);
  border-radius: 28px;
  box-shadow: 0 34px 90px rgba(17, 29, 22, .18);
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(3, 38, 21, .88), rgba(0, 107, 53, .72)),
    url("/static/assets/login-model.jpg") center top / cover;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 40, 19, .36)),
    radial-gradient(circle at 85% 90%, rgba(247, 199, 15, .22), transparent 32%);
  pointer-events: none;
}

.visual-content,
.login-feature-grid {
  position: relative;
  z-index: 1;
}

.login-kicker {
  display: inline-flex;
  width: max-content;
  align-items: center;
  min-height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: #07140c;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.visual-content h1 {
  max-width: 560px;
  margin: 22px 0 14px;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: uppercase;
}

.visual-content p {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 15px;
  line-height: 1.6;
}

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

.login-feature-grid div {
  min-height: 86px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .11);
  backdrop-filter: blur(9px);
}

.login-feature-grid strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
}

.login-feature-grid span {
  display: block;
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  line-height: 1.42;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 38px;
  background: #fff;
}

body.admin-theme-dark .login-panel {
  background: var(--panel);
}

.login-logo {
  width: 86px;
  height: 86px;
  object-fit: cover !important;
  align-self: center;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: 0 14px 34px rgba(15, 22, 18, .14);
}

.login-panel h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 28px;
  line-height: 1.1;
  text-transform: uppercase;
}

.login-panel > p {
  margin: 0 0 26px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

label {
  display: block;
  margin: 11px 0 7px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

body.admin-theme-dark input,
body.admin-theme-dark select,
body.admin-theme-dark textarea {
  background: #0e1110;
  color: var(--ink);
  border-color: var(--line);
}

body.admin-theme-dark .card,
body.admin-theme-dark .top,
body.admin-theme-dark .dashboard-hero,
body.admin-theme-dark .operation-strip,
body.admin-theme-dark .stat,
body.admin-theme-dark .row,
body.admin-theme-dark .setting-field {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}

body.admin-theme-dark .card p,
body.admin-theme-dark .top p,
body.admin-theme-dark small,
body.admin-theme-dark .row small {
  color: var(--muted);
}

body.admin-theme-dark .btn {
  background: #222826;
  color: var(--ink);
}

body.admin-theme-dark .btn.primary {
  background: var(--green);
  color: #05100b;
}

body.admin-theme-minimal .btn.primary {
  background: var(--ink);
  color: #fff;
}

input, select { height: 42px; padding: 0 12px; }
textarea { min-height: 86px; padding: 11px 12px; resize: vertical; }

.input-wrap input {
  height: 50px;
  padding-right: 48px;
  border-radius: 14px;
  background: #fbfbfb;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(0, 107, 53, .55);
  box-shadow: 0 0 0 4px rgba(0, 107, 53, .08);
  background: #fff;
}

.field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  transform: translateY(-50%);
  color: #4d5851;
}

.field-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 18px;
  font-size: 12px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #4f5b54;
  text-transform: none;
  letter-spacing: 0;
}

.remember input { width: 17px; height: 17px; accent-color: var(--green); }
.login-options a { color: var(--green); font-weight: 900; text-decoration: none; }

.login-submit,
.btn,
.view-store,
.login-actions a,
.login-actions button,
.sidebar-footer a,
.sidebar-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.login-submit {
  width: 100%;
  min-height: 50px;
  background: linear-gradient(135deg, #00723a, #004e28);
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 107, 53, .24);
  text-transform: uppercase;
}

.demo-box {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 14px;
  border-left: 4px solid var(--yellow);
  border-radius: 12px;
  background: #fff8d7;
  color: #1f261f;
  font-size: 12px;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.login-actions a { background: #eef1ef; color: #111; }
.login-actions button { background: #090b0a; color: #fff; }

.app {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .04), transparent 35%),
    #0b1110;
  color: #fff;
}

body.admin-theme-classic .sidebar {
  background:
    linear-gradient(180deg, rgba(0, 122, 61, .08), transparent 38%),
    #f9fbf9;
  border-right: 1px solid var(--line);
  color: var(--ink);
}

body.admin-theme-minimal .sidebar {
  background:
    linear-gradient(180deg, rgba(182, 147, 47, .08), transparent 38%),
    #ffffff;
  border-right: 1px solid var(--line);
  color: var(--ink);
}

.side-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 126px;
  padding: 12px 10px 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 199, 15, .13), transparent 45%),
    rgba(255, 255, 255, .045);
  text-align: center;
}

body.admin-theme-classic .side-brand,
body.admin-theme-minimal .side-brand {
  border-color: var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(182, 147, 47, .12), transparent 45%),
    var(--panel-soft);
}

.side-brand img {
  flex: 0 0 62px;
  width: 62px !important;
  height: 62px !important;
  max-width: 62px !important;
  max-height: 62px !important;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  object-fit: cover !important;
  padding: 3px;
}

.sidebar-logo {
  flex: 0 0 62px;
  width: 62px !important;
  height: 62px !important;
  max-width: 62px !important;
  max-height: 62px !important;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .24));
}

.side-brand strong {
  display: block;
  max-width: 180px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
}

body.admin-theme-classic .side-brand strong,
body.admin-theme-minimal .side-brand strong {
  color: var(--ink);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  background: transparent;
  color: #d8e1dc;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
  cursor: pointer;
}

body.admin-theme-classic .side-nav button,
body.admin-theme-minimal .side-nav button {
  color: #403a30;
}

.side-nav button:hover,
.side-nav button.active {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}

body.admin-theme-classic .side-nav button:hover,
body.admin-theme-classic .side-nav button.active,
body.admin-theme-minimal .side-nav button:hover,
body.admin-theme-minimal .side-nav button.active {
  background: var(--green-soft);
  color: var(--ink);
}

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--yellow);
  font-size: 14px;
}

body.admin-theme-classic .nav-icon,
body.admin-theme-minimal .nav-icon {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--line);
}

.sidebar-footer {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 8px;
  margin-top: auto;
}

.sidebar-footer a { background: rgba(255, 255, 255, .1); color: #fff; }
.sidebar-footer button { background: rgba(201, 52, 52, .16); color: #ffd1d1; }

body.admin-theme-classic .sidebar-footer a,
body.admin-theme-minimal .sidebar-footer a {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

body.admin-theme-classic .sidebar-footer button,
body.admin-theme-minimal .sidebar-footer button {
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid #f1d4d4;
}

.main {
  min-width: 0;
  padding: 28px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  color: #0b7a43;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top h1 {
  margin: 4px 0 4px;
  font-size: 32px;
  line-height: 1.1;
}

.top p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.view-store {
  background: #101411;
  color: #fff;
  white-space: nowrap;
}

.page { display: none; }
.page.active { display: block; }

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

.stat {
  position: relative;
  display: block;
  text-align: left;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 10px 25px rgba(12, 28, 20, .04);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.stat:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 107, 53, .28);
  box-shadow: 0 18px 36px rgba(12, 28, 20, .09);
}

.stat b {
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 15px;
}

.stat span {
  display: block;
  font-size: 31px;
  font-weight: 950;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 22px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(6, 47, 28, .95), rgba(0, 107, 53, .86)),
    url("/static/assets/login-model.jpg") center 30% / cover;
  color: #fff;
  box-shadow: 0 18px 45px rgba(4, 36, 20, .17);
  overflow: hidden;
}

.dashboard-hero span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(247, 199, 15, .95);
  color: #0b1110;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  margin: 14px 0 7px;
  font-size: 28px;
  line-height: 1.1;
}

.dashboard-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .84);
  line-height: 1.5;
}

.dashboard-hero .btn {
  min-height: 44px;
  background: #fff;
  color: #082414;
  white-space: nowrap;
}

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

.whatsapp-card {
  min-height: 196px;
}

.wa-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wa-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf9;
}

.wa-status-line span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .14);
}

.wa-status-line.connected span {
  background: #008a45;
  box-shadow: 0 0 0 5px rgba(0, 138, 69, .14);
}

.wa-status-line strong {
  font-size: 13px;
}

.wa-qr-box {
  display: grid;
  min-height: 0;
  place-items: center;
  margin-top: 14px;
}

.wa-qr-box:empty {
  display: none;
}

.wa-qr-box img {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1;
  border: 10px solid #fff;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}

.wa-qr-box p {
  max-width: 420px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.wa-qr-loading,
.wa-qr-error,
.wa-qr-text {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #f8fbf9;
  color: #17231c;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  word-break: break-word;
}

.wa-qr-error {
  border-color: #f4c7c7;
  background: #fff5f5;
  color: #991b1b;
}

.wa-modal-panel {
  width: min(430px, 100%);
  text-align: center;
}

.wa-modal-panel .modal-head {
  text-align: left;
}

.wa-modal-panel .wa-qr-box {
  min-height: 220px;
}

.quick-card {
  display: grid;
  gap: 8px;
}

.quick-card h2 {
  margin-bottom: 4px;
}

.quick-card button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: #17231c;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.quick-card button:hover {
  border-color: rgba(0, 107, 53, .35);
  background: #f7fbf8;
}

.quick-card button span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.stat p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.operation-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.operation-strip div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(12, 28, 20, .04);
}

.operation-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.operation-strip strong {
  color: var(--green);
  font-size: 20px;
  font-weight: 950;
}

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

.products-manager {
  min-height: 520px;
}

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.products-toolbar h2 {
  margin: 0 0 4px;
}

.products-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.limit-control {
  margin: 0;
  color: var(--muted);
}

.product-table .row {
  grid-template-columns: 66px minmax(0, 1fr) auto;
}

.product-thumb {
  position: relative;
  width: 58px;
  height: 58px;
}

.product-thumb img,
.product-thumb video {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #edf2ef;
}

.promo-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #d91f26;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(217, 31, 38, .24);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pagination-bar div {
  display: flex;
  gap: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 10, 7, .62);
  backdrop-filter: blur(7px);
}

.modal-panel {
  width: min(820px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.modal-head span {
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.modal-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #eef2ef;
  font-weight: 950;
  cursor: pointer;
}

.upload-box {
  position: relative;
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 116px;
  border: 1.5px dashed rgba(0, 107, 53, .34);
  border-radius: 16px;
  background: #f8fcf9;
  color: #203228;
  text-align: center;
}

.upload-box input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-box strong {
  font-size: 15px;
  font-weight: 950;
}

.upload-box span {
  color: var(--muted);
  font-size: 12px;
}

.media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 0;
  margin-top: 10px;
}

.media-preview-item {
  position: relative;
  width: 78px;
  height: 78px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #eef3ef;
}

.media-preview-item img,
.media-preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-preview-item button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.modal-actions {
  justify-content: flex-end;
}

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(12, 28, 20, .05);
}

.small-card { max-width: 680px; }
.field-help {
  display: block;
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.card h2 { margin: 0 0 15px; font-size: 18px; line-height: 1.2; }
.card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head.compact { margin-bottom: 12px; }

.settings-form {
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-form h2,
.settings-form > button {
  grid-column: 1 / -1;
}

.settings-form h2 {
  margin-bottom: 4px;
}

.setting-field {
  min-width: 0;
  border: 1px solid #e7ece8;
  border-radius: 14px;
  background: #fbfcfb;
  padding: 12px;
}

.setting-field.full {
  grid-column: 1 / -1;
}

.setting-field label {
  margin-top: 0;
}

.setting-field .input-wrap input,
.setting-field .input-wrap select {
  height: 46px;
  padding-right: 48px;
  border-radius: 12px;
  background: #fff;
}

.setting-field textarea {
  background: #fff;
}

.setting-field .field-icon {
  right: 13px;
  color: var(--green);
}

.pages-card {
  max-width: 980px;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.page-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 15px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.page-tabs button.active {
  border-color: var(--green);
  background: #eff8f2;
  color: var(--green);
}

.page-editor {
  display: none;
}

.page-editor.active {
  display: block;
}

.page-editor textarea {
  min-height: 360px;
  line-height: 1.55;
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.btn {
  background: #e9eeeb;
  color: #111;
}

.btn.primary { background: var(--green); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.warn { background: #111; color: #fff; }

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

.checks label,
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: #334039;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

.checks input,
.check-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 7px 0 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #f7faf8;
  color: #26332c;
  font-size: 12px;
  font-weight: 850;
}

.chip input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}

.chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #e5ebe7;
  cursor: pointer;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 14px;
}

.table-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-state {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #f8fbf9;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px;
  background: #fff;
}

.product-admin-card,
.order-admin-card {
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(12, 28, 20, .06);
}

.product-admin-card.is-soldout {
  opacity: .74;
}

.product-admin-info {
  display: grid;
  gap: 6px;
}

.soldout-toggle {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
}

.soldout-toggle input {
  width: 15px;
  height: 15px;
  accent-color: var(--danger);
}

.subsection-title {
  margin-top: 24px !important;
}

.color-inline-form {
  grid-template-columns: 1fr 70px auto;
}

.color-inline-form input[type="color"] {
  width: 70px;
  padding: 4px;
}

.color-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
}

.color-chip i {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.admin-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-color-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.order-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
}

.delivery-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(12, 28, 20, .06);
}

.delivery-icon-btn span {
  font-size: 20px;
  line-height: 1;
}

.delivery-icon-btn.saiu_entrega {
  border-color: rgba(0,122,61,.28);
  background: #eaf8f0;
}

.delivery-icon-btn.entregue {
  border-color: rgba(0,122,61,.38);
  background: var(--green);
  color: #fff;
}

.delivery-icon-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
  filter: grayscale(1);
}

.order-admin-card em {
  display: inline-flex;
  width: max-content;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 4px 9px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.order-admin-card.is-canceled .order-status-dot {
  background: var(--danger);
}

.order-modal-panel {
  width: min(840px, 100%);
}

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

.order-detail-grid > div,
.order-items-box,
.order-total-box,
.cancel-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 12px;
}

.order-detail-grid .full {
  grid-column: 1 / -1;
}

.order-detail-grid strong,
.order-detail-grid span {
  display: block;
}

.order-detail-grid strong {
  margin-bottom: 5px;
  font-size: 11px;
  text-transform: uppercase;
}

.order-items-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.order-item-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.order-item-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.order-total-box {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 18px;
  font-weight: 950;
}

.cancel-box {
  margin-top: 12px;
}

.whatsapp-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.whatsapp-test-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.whatsapp-template-card {
  display: grid;
  gap: 16px;
}

.wa-variable-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wa-variable-list button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.wa-variable-list strong,
.wa-variable-list span {
  display: block;
}

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

.wa-variable-list span {
  color: var(--muted);
  font-size: 10px;
}

.wa-template-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wa-delivery-mode {
  display: grid;
  grid-template-columns: minmax(220px, 320px);
  gap: 7px;
}

.wa-template-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  font-weight: 850;
  cursor: pointer;
}

.wa-template-tabs button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.wa-template-editor {
  display: none;
}

.wa-template-editor.active {
  display: grid;
  gap: 10px;
}

.wa-template-editor textarea {
  min-height: 280px;
  font-family: Consolas, monospace;
  line-height: 1.45;
}

.post-sale-schedule {
  display: grid;
  grid-template-columns: 1fr 160px 1fr 160px;
  gap: 10px;
  align-items: center;
}

.emoji-editor {
  position: relative;
}

.emoji-editor textarea {
  padding-right: 76px;
}

.emoji-trigger {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.emoji-panel {
  position: absolute;
  top: 42px;
  right: 8px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow);
}

.emoji-panel button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: pointer;
}

.top .eyebrow,
#pageSubtitle,
.dashboard-hero h2,
.dashboard-hero > .btn.primary,
[data-page="statuses"],
#statuses,
.stat[onclick*="statuses"] {
  display: none !important;
}

.row img {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #edf2ef;
}

.row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

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

.theme-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(12, 28, 20, .08);
}

.theme-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(0, 107, 53, .08);
}

.theme-card strong { display: block; margin-bottom: 5px; }
.theme-card p { min-height: 38px; }

.theme-preview {
  height: 110px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
}

.theme-preview.dark { background: linear-gradient(135deg, #050607, #111, #006b35); }
.theme-preview.classic { background: linear-gradient(135deg, #fff, #f0f4f1); }
.theme-preview.minimal { background: linear-gradient(135deg, #fbfbfb, #fff 45%, #e6eee9); }

pre {
  display: none;
  margin: 14px 0 0;
  overflow: auto;
  border-radius: 12px;
  padding: 14px;
  background: #0d1110;
  color: #67f0a5;
  white-space: pre-wrap;
}

pre:not(:empty) { display: block; }

body.admin-theme-dark .btn {
  background: #222826;
  color: var(--ink);
}

body.admin-theme-dark .btn.primary {
  background: var(--green);
  color: #041009;
}

body.admin-theme-minimal .btn.primary {
  background: var(--ink);
  color: #fff;
}

body.admin-theme-dark .setting-field .input-wrap input,
body.admin-theme-dark .setting-field .input-wrap select,
body.admin-theme-dark .setting-field textarea,
body.admin-theme-dark .upload-box {
  background: #0e1110;
  color: var(--ink);
  border-color: var(--line);
}

@media (max-width: 1020px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 480px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .side-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats, .grid.two, .themes, .dashboard-grid, .operation-strip, .settings-form, .whatsapp-admin-grid, .post-sale-schedule { grid-template-columns: 1fr; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  .login-screen { padding: 14px; }
  .login-shell { border-radius: 20px; }
  .login-visual { min-height: 420px; padding: 26px; }
  .login-feature-grid, .side-nav, .stats, .form-row, .checks, .login-actions, .inline-form, .products-filters { grid-template-columns: 1fr; }
  .login-panel { padding: 30px 22px; }
  .main { padding: 18px; }
  .top { align-items: flex-start; flex-direction: column; }
  .products-toolbar { align-items: flex-start; flex-direction: column; }
  .pagination-bar { align-items: flex-start; flex-direction: column; }
  .modal { padding: 12px; }
  .modal-panel { padding: 16px; border-radius: 16px; }
  .dashboard-hero { padding: 18px; }
  .dashboard-hero h2 { font-size: 23px; }
  .row { grid-template-columns: 52px 1fr; }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .wa-variable-list { max-height: 220px; overflow: auto; }
  .wa-template-editor textarea { min-height: 240px; }
  .delivery-icon-btn { width: 40px; height: 40px; min-width: 40px; }
}

/* ===== Painel profissional + configuração técnica oculta ===== */
.app {
  background:
    radial-gradient(circle at 78% -10%, rgba(0, 107, 53, .10), transparent 34%),
    linear-gradient(180deg, var(--bg), #eef4f0 120%);
}

body.admin-theme-dark .app {
  background:
    radial-gradient(circle at 78% -10%, rgba(0, 168, 88, .12), transparent 34%),
    linear-gradient(180deg, #080b0a, #050706 120%);
}

.sidebar {
  box-shadow: 18px 0 55px rgba(0, 0, 0, .08);
}

.side-nav button {
  position: relative;
  overflow: hidden;
}

.side-nav button::after {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 999px;
  background: transparent;
  transition: background .18s ease;
}

.side-nav button.active::after { background: var(--yellow); }

.top {
  min-height: 104px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.74)),
    radial-gradient(circle at 10% 20%, rgba(0,107,53,.10), transparent 28%);
  box-shadow: var(--shadow);
}

body.admin-theme-dark .top {
  background:
    linear-gradient(135deg, rgba(18,21,20,.96), rgba(18,21,20,.78)),
    radial-gradient(circle at 10% 20%, rgba(0,168,88,.12), transparent 28%);
}

.top h1 {
  letter-spacing: -.04em;
}

.view-store {
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 12px 28px rgba(0, 107, 53, .20);
}

.dashboard-hero {
  position: relative;
  min-height: 170px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 26px;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(247,199,15,.18);
  filter: blur(2px);
}

.dashboard-hero > * { position: relative; z-index: 1; }

.stats,
.operation-strip,
.dashboard-grid {
  gap: 16px;
}

.stat,
.card,
.operation-strip div,
.row {
  border-radius: 18px;
}

.stat {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.86)),
    radial-gradient(circle at 90% 10%, rgba(0,107,53,.10), transparent 40%);
}

body.admin-theme-dark .stat,
body.admin-theme-dark .operation-strip div,
body.admin-theme-dark .quick-card button,
body.admin-theme-dark .wa-status-line {
  background: var(--panel-soft);
}

.stat span,
.operation-strip strong {
  letter-spacing: -.04em;
}

.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.90));
}

body.admin-theme-dark .card {
  background:
    linear-gradient(180deg, rgba(18,21,20,.98), rgba(18,21,20,.90));
}

.products-toolbar,
.card-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.btn.primary,
.login-submit {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(0,107,53,.18);
}

body.admin-theme-minimal .btn.primary {
  background: linear-gradient(135deg, #17130d, #3f3526);
}

.settings-titleline {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.settings-titleline span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-titleline h2 {
  margin: 10px 0 4px !important;
}

.settings-titleline p {
  margin: 0;
}

.public-settings-card {
  max-width: 1040px;
}

.dev-config-panel {
  width: min(760px, 100%);
  border-radius: 24px;
}

.dev-lock-view {
  display: grid;
  gap: 14px;
  max-width: 430px;
  margin: 0 auto;
  text-align: center;
}

.dev-lock-illustration {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  margin: 4px auto 2px;
  border-radius: 22px;
  background: var(--green-soft);
  color: var(--green);
}

.dev-lock-illustration svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dev-lock-view p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dev-config-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

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

.dev-config-grid .full,
.dev-config-actions {
  grid-column: 1 / -1;
}

.dev-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5000;
  max-width: min(420px, calc(100vw - 48px));
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 14px 16px;
  background: #0b1110;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0,0,0,.26);
  font-size: 13px;
  font-weight: 900;
  transition: opacity .2s ease, transform .2s ease;
}

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

.admin-toast.error {
  background: #3b1111;
}

@media (max-width: 860px) {
  .dev-config-grid { grid-template-columns: 1fr; }
  .dev-config-actions { flex-direction: column-reverse; }
}

/* ==== Guia Funcionários, permissões e popups profissionais ==== */
body {
  font-family: "Segoe UI", Inter, Arial, Helvetica, sans-serif;
  letter-spacing: -.01em;
}
body.admin-theme-dark {
  --bg: #07080b;
  --panel: #11141a;
  --panel-soft: #1a1e27;
  --ink: #f8f7f2;
  --muted: #aeb6c2;
  --line: #2a303a;
  --green: #d4ad52;
  --green-dark: #8b6f28;
  --green-soft: rgba(212,173,82,.14);
  --yellow: #f4d779;
}
body.admin-theme-classic {
  --bg: #f2f5f8;
  --panel: rgba(255,255,255,.96);
  --panel-soft: #e9edf2;
  --ink: #141821;
  --muted: #657180;
  --line: #d7dee7;
  --green: #31485e;
  --green-dark: #1c2d3d;
  --green-soft: #edf2f7;
  --yellow: #b58a36;
}
body.admin-theme-minimal {
  --bg: #fbf8f1;
  --panel: #ffffff;
  --panel-soft: #f2eadc;
  --ink: #181410;
  --muted: #756a5b;
  --line: #e1d6c4;
  --green: #181410;
  --green-dark: #302820;
  --green-soft: #f4ecdc;
  --yellow: #c49a38;
}
.card, .top, .dashboard-hero, .operation-strip div, .stat {
  backdrop-filter: blur(10px);
}
.employees-manager { min-height: 480px; }
.employee-row {
  grid-template-columns: 58px minmax(0, 1fr) auto !important;
  align-items: center;
}
.employee-row.is-inactive { opacity: .62; }
.employee-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 18px;
  font-weight: 950;
}
.employee-perm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.employee-perm-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 850;
}
.employee-form { width: min(850px, 96vw); }
.employee-active { margin-top: 12px; }
.permission-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel-soft);
}
.permission-toggle {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 16px;
  font-weight: 950;
  cursor: pointer;
}
.employee-permissions-panel {
  border-top: 1px solid var(--line);
  padding: 16px;
}
.employee-permissions-panel.collapsed { display: none; }
.employee-permissions-panel p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 0 12px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.permission-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.permission-check span {
  font-size: 12px;
  font-weight: 850;
}
.confirm-panel {
  width: min(420px, 92vw);
  text-align: center;
  padding: 30px;
}
.confirm-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 34px;
  font-weight: 950;
}
.confirm-icon.danger,
.confirm-icon.error {
  background: #fff1f1;
  color: var(--danger);
}
.confirm-icon.success {
  background: #e9f9ef;
  color: #12854e;
}
.confirm-panel h2 { margin: 0 0 8px; }
.confirm-panel p {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.5;
}
.confirm-actions { justify-content: center; }
@media (max-width: 760px) {
  .permission-grid { grid-template-columns: 1fr; }
  .employee-row { grid-template-columns: 48px minmax(0, 1fr) !important; }
  .employee-row .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Atualizações GitHub - área restrita ALT+G */
.github-updater-section {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-soft), var(--panel));
}
.github-updater-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.github-updater-head span {
  color: var(--green);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.github-updater-head h3 {
  margin: 4px 0 5px;
  font-size: 20px;
}
.github-updater-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.github-site-form {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 150px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.github-site-form .full { grid-column: 1 / -1; }
.github-site-form .check-line {
  margin: 0;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.github-site-form .check-line input { width: 17px; height: 17px; }
.github-danger-check { color: var(--danger) !important; }
.github-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.github-sites-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.github-site-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(12,28,20,.05);
}
.github-site-main strong { display:block; font-size: 15px; margin-bottom: 4px; }
.github-site-main small,
.github-site-main code {
  display:block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.github-site-main code {
  margin-top: 3px;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
}
.github-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.github-badges span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}
.github-badges .off { background:#fff5f5; color: var(--danger); }
.github-badges .danger { background:#fff0db; color:#9a5b00; }
.github-site-main em {
  display:block;
  margin-top: 8px;
  color: var(--green);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.github-last-error {
  margin: 8px 0 0 !important;
  color: var(--danger) !important;
  font-size: 12px !important;
}
.github-site-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.github-update-log {
  display: none;
  max-height: 280px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0b1110;
  color: #d9fbe8;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.github-update-log.active { display: block; }
.github-update-log.error { color: #ffd6d6; border-color: rgba(201,52,52,.35); }
@media (max-width: 820px) {
  .github-updater-head,
  .github-site-card { grid-template-columns: 1fr; display: grid; }
  .github-site-form { grid-template-columns: 1fr; }
  .github-site-actions,
  .github-form-actions { justify-content: stretch; }
  .github-site-actions .btn,
  .github-form-actions .btn { width: 100%; }
}

/* Upload da foto principal da loja */
.hero-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 8px 0 10px;
}
.hero-upload-row input[type="file"] {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
}
.hero-preview-box {
  display: grid;
  gap: 8px;
  margin: 8px 0 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
}
.hero-preview-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.hero-preview-box img {
  width: 100%;
  max-height: 210px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
}
@media (max-width: 720px) {
  .hero-upload-row { grid-template-columns: 1fr; }
}

/* ==============================
   EDY Admin Pro V5 - painel, pedidos, popups e chat
   ============================== */
.app { background: linear-gradient(135deg, var(--bg), var(--panel-soft)); }
.card,
.modal-panel,
.row {
  border-color: rgba(15, 23, 42, .08);
  box-shadow: 0 14px 38px rgba(15, 23, 42, .07);
}
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: -28px -28px 22px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 250, .88);
  backdrop-filter: blur(14px);
}
body.admin-theme-dark .top { background: rgba(9, 11, 10, .88); }
.sidebar { box-shadow: 12px 0 38px rgba(15, 23, 42, .08); }
.side-nav button { min-height: 46px; border: 1px solid transparent; }
.side-nav button.active { border-color: rgba(0, 107, 53, .18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.btn { transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(15,23,42,.08); }
.btn.warn { background: #fff7e6; color: #9a5b00; border: 1px solid #f4d39a; }

.table-list { display: grid; gap: 10px; }
.order-pro-card {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0,107,53,.035), transparent 40%),
    var(--panel);
}
.order-pro-card.is-new { border-left: 5px solid #008a45; }
.order-pro-card.is-pix { border-left: 5px solid #8b5cf6; }
.order-pro-card.is-out { border-left: 5px solid #0ea5e9; }
.order-pro-card.is-delivered { border-left: 5px solid #16a34a; opacity: .96; }
.order-pro-card.is-canceled { border-left: 5px solid var(--danger); opacity: .74; }
.order-card-main { min-width: 0; display: grid; gap: 7px; }
.order-card-titleline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.order-card-titleline strong { font-size: 13px; line-height: 1.25; word-break: break-word; }
.order-card-titleline span { font-size: 13px; font-weight: 900; color: var(--green); }
.order-card-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--panel-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.value-pill { background: var(--green-soft); color: var(--green); }
.status-pill { background: #fff8df; color: #8a6500; }
body.admin-theme-dark .status-pill { background: rgba(247,199,15,.14); color: #f7c70f; }
.order-pro-card em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.order-actions-pro { display: flex; align-items: center; gap: 8px; position: relative; }
.order-details-btn { min-width: 92px; }
.order-more-wrap { position: relative; }
.order-more-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  cursor: pointer;
}
.order-more-btn span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}
.order-action-menu {
  position: absolute;
  right: 0;
  top: 45px;
  z-index: 80;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 24px 55px rgba(15,23,42,.18);
}
.order-action-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}
.order-action-menu button:hover { background: var(--panel-soft); }
.order-action-menu button.danger { color: var(--danger); }

.modal { padding: 22px; background: rgba(7, 12, 10, .46); backdrop-filter: blur(8px); }
.modal-panel {
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.28);
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, var(--panel), rgba(255,255,255,.94));
  border-bottom: 1px solid var(--line);
  margin: -26px -26px 22px;
  padding: 22px 26px;
}
body.admin-theme-dark .modal-head { background: linear-gradient(180deg, var(--panel), rgba(18,21,20,.94)); }
.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 0;
  position: relative;
}
.modal-close::before { content: "×"; font-size: 22px; line-height: 1; }
.order-modal-panel { width: min(1180px, 96vw); padding: 26px; }
.order-modal-layout-pro { display: grid; grid-template-columns: minmax(0, 1.35fr) 390px; gap: 18px; align-items: start; }
.order-modal-main-pro,
.order-chat-card-pro {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 16px;
}
.order-top-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green-soft), var(--panel-soft));
  border: 1px solid var(--line);
}
.order-avatar { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; background: var(--panel); font-size: 23px; box-shadow: inset 0 0 0 1px var(--line); }
.order-top-summary h3 { margin: 7px 0 2px; font-size: 20px; line-height: 1.1; }
.order-top-summary p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; word-break: break-word; }
.order-top-summary > strong { font-size: 22px; color: var(--green); white-space: nowrap; }
.order-chip { display: inline-flex; width: max-content; min-height: 24px; align-items: center; border-radius: 999px; padding: 0 10px; background: #fff8df; color: #8a6500; font-size: 11px; font-weight: 950; }
.order-chip.is-canceled { background: #fff1f1; color: var(--danger); }
.order-chip.is-delivered { background: #e8f8ef; color: #087d40; }
.order-detail-grid-pro { margin-top: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.order-detail-grid-pro div {
  position: relative;
  min-height: 86px;
  border-radius: 16px;
  padding: 12px 12px 12px 44px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}
.order-detail-grid-pro i { position: absolute; left: 13px; top: 13px; font-style: normal; font-size: 20px; }
.order-detail-grid-pro strong { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.order-detail-grid-pro span { display: block; margin-top: 5px; font-size: 13px; font-weight: 900; line-height: 1.35; word-break: break-word; }
.order-items-pro-box { display: grid; gap: 9px; margin-top: 14px; }
.order-item-pro-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.item-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: var(--green-soft); }
.item-main strong { display: block; font-size: 13px; line-height: 1.3; }
.item-main span, .item-values small { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.item-values { text-align: right; }
.item-values b { display: block; margin-top: 4px; font-size: 15px; color: var(--green); }
.order-total-pro { margin-top: 14px; border-radius: 16px; background: #101411; color: #fff; padding: 16px; }
.order-total-pro strong { color: #fff; font-size: 22px; }
.cancel-box-pro { margin-top: 14px; border: 1px solid #f1d4d4; border-radius: 16px; padding: 12px 14px; background: #fff8f8; }
.cancel-box-pro summary { cursor: pointer; font-weight: 950; color: #9b1c1c; }
.order-action-row-pro { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.order-action-row-pro .btn { min-height: 40px; }
.order-chat-card-pro { position: sticky; top: 86px; }
.chat-head-pro { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.chat-head-pro span { color: var(--muted); font-size: 10px; font-weight: 950; text-transform: uppercase; }
.chat-head-pro h3 { margin: 3px 0 0; font-size: 17px; }
.order-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  height: 330px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-soft);
}
.chat-empty { margin: auto; color: var(--muted); text-align: center; font-weight: 850; }
.chat-bubble { max-width: 86%; border-radius: 16px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); }
.chat-bubble.admin { align-self: flex-end; background: #e9f8ef; border-color: #bde9cd; }
.chat-bubble.customer { align-self: flex-start; }
.chat-bubble strong { display: block; font-size: 11px; margin-bottom: 4px; }
.chat-bubble p { margin: 0; line-height: 1.35; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.chat-bubble span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.order-chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) 86px; gap: 8px; margin-top: 10px; }
.order-chat-compose textarea { min-height: 54px; max-height: 110px; resize: vertical; }
.order-chat-card-pro small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.admin-order-bell {
  position: fixed;
  right: 26px;
  bottom: 92px;
  z-index: 1200;
  display: grid;
  grid-template-columns: 32px auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  min-width: 118px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px 7px 10px;
  background: linear-gradient(135deg, #101411, #006b35);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 107, 53, .28);
  cursor: pointer;
}
.admin-order-bell .bell-icon { grid-row: span 2; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 20px; }
.admin-order-bell b { font-size: 16px; line-height: 1; text-align: left; }
.admin-order-bell small { font-size: 10px; font-weight: 900; text-align: left; opacity: .9; }
.admin-order-bell.pulse { animation: bellPulse 1.4s ease-in-out infinite; }
@keyframes bellPulse { 0%,100%{ transform: translateY(0) scale(1); } 50%{ transform: translateY(-3px) scale(1.04); } }

@media (max-width: 1180px){
  .app { grid-template-columns: 92px minmax(0, 1fr); }
  .side-brand strong, .side-nav button:not(.active) { font-size: 0; }
  .side-nav button { justify-content: center; padding: 0; }
  .nav-icon { margin: 0; }
  .sidebar-footer { grid-template-columns: 1fr; }
  .sidebar-footer a, .sidebar-footer button { font-size: 0; }
  .order-modal-layout-pro { grid-template-columns: 1fr; }
  .order-chat-card-pro { position: static; }
}
@media (max-width: 820px){
  .main { padding: 16px; }
  .top { margin: -16px -16px 18px; padding: 16px; align-items: flex-start; flex-direction: column; }
  .stats, .dashboard-grid, .grid.two { grid-template-columns: 1fr; }
  .order-pro-card { grid-template-columns: 46px minmax(0, 1fr); }
  .order-pro-card .order-actions-pro { grid-column: 1 / -1; justify-content: flex-end; width: 100%; }
  .order-card-pills { gap: 5px; }
  .pill { max-width: 100%; white-space: normal; }
  .modal { padding: 8px; }
  .modal-panel { width: 100% !important; max-height: calc(100vh - 16px); border-radius: 18px; }
  .modal-head { margin: -18px -18px 16px; padding: 16px 18px; }
  .order-modal-panel { padding: 18px; }
  .order-top-summary { grid-template-columns: 42px minmax(0,1fr); }
  .order-top-summary > strong { grid-column: 1 / -1; font-size: 18px; }
  .order-detail-grid-pro { grid-template-columns: 1fr; }
  .order-item-pro-line { grid-template-columns: 34px minmax(0, 1fr); }
  .item-values { grid-column: 1 / -1; text-align: left; display: flex; flex-wrap: wrap; gap: 8px 12px; }
  .order-chat-compose { grid-template-columns: 1fr; }
  .admin-order-bell { right: 14px; bottom: 74px; }
}
@media (max-width: 560px){
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: 66px; z-index: 1000; flex-direction: row; padding: 8px; overflow-x: auto; border-top: 1px solid var(--line); }
  .side-brand, .sidebar-footer { display: none; }
  .side-nav { flex-direction: row; gap: 6px; }
  .side-nav button { min-width: 52px; min-height: 48px; border-radius: 14px; }
  .main { padding-bottom: 86px; }
  .order-action-menu { right: auto; left: 0; width: 220px; }
}
