* { box-sizing: border-box; }
:root { color-scheme: light; --blue: #185adb; --ink: #162d4f; --muted: #64758e; --line: #e3eaf3; }
body { margin: 0; background: #f5f7fb; color: var(--ink); font: 15px/1.6 "Segoe UI", system-ui, sans-serif; }
a { color: #1554bc; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; background: var(--blue); color: #fff; padding: 11px 18px; font-weight: 650; cursor: pointer; text-decoration: none; transition: background .2s, box-shadow .2s; }
button:hover, .button:hover { background: #1147b4; box-shadow: 0 5px 15px #185adb18; }
.secondary { background: #f0f5ff; color: #24529a; border-color: #dfE8f8; }
.secondary:hover { background: #e1ecff; }
.danger { background: #fff; color: #ae3149; border-color: #f0d7dc; }
.danger:hover { background: #fff1f3; }
:focus-visible { outline: 3px solid #ca8618; outline-offset: 3px; }
.admin-layout { padding-left: 256px; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: 256px; padding: 30px 20px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.admin-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 800; letter-spacing: -.7px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(140deg, #2879f6, #1143ac); color: white; font-size: 20px; }
.admin-brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .3px; }
.admin-sidebar nav { display: grid; gap: 10px; margin-top: 30px; }
.sidebar-group { position: relative; }
.sidebar-group summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 14px; border: 1px solid var(--line); border-radius: 12px; color: #405673; background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group summary:hover, .sidebar-group[open] summary, .sidebar-group summary.sidebar-current { color: #185adb; border-color: #c9dcf9; background: #edf4ff; }
.sidebar-arrow { font-size: 22px; line-height: 1; }
.sidebar-submenu { position: absolute; z-index: 1; top: 0; left: 100%; width: 260px; padding: 10px; border: 1px solid #dce6f4; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px #162d4f26; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 13px 10px; border-radius: 9px; color: #52657e; text-decoration: none; font-size: 13px; font-weight: 600; }
.admin-sidebar nav a span { font-size: 10px; color: #8299ba; }
.admin-products > .product-row { flex-wrap: wrap; }
.quick-editor { flex-basis: 100%; min-width: 0; }
.quick-editor summary { cursor: pointer; color: #185adb; font-size: 13px; font-weight: 650; padding: 10px 0; }
.quick-editor form { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; }
.quick-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; border: 0; padding: 0; margin: 0 0 12px; }
.quick-fields label { min-width: 0; }
.quick-fields:disabled { opacity: .7; }
.product-cost-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; margin: 16px 0; }
.product-cost-summary > div { min-width: 0; padding: 12px 14px; border: 1px solid #dce5f1; border-top: 3px solid #64748b; border-radius: 10px; background: #f5f8fc; }
.product-cost-summary dt { font-size: 11px; color: inherit; font-weight: 650; }
.product-cost-summary dd { margin: 5px 0 0; font-size: 16px; font-weight: 750; overflow-wrap: anywhere; }
.product-cost-summary .cost-metric-cost { color: #7a4510; background: #fff8eb; border-color: #ecd4a7; border-top-color: #b77916; }
.product-cost-summary .cost-metric-markup { color: #6634a0; background: #f7f0ff; border-color: #dcc8f0; border-top-color: #8750b8; }
.product-cost-summary .cost-metric-sale { color: #124da4; background: #edf4ff; border-color: #c9dcf9; border-top-color: #2563eb; }
.product-cost-summary .cost-metric-profit { color: #17613c; background: #effaf3; border-color: #cce8d7; border-top-color: #238653; }
.product-cost-summary .cost-metric-margin { color: #11646b; background: #edfafa; border-color: #bde3e5; border-top-color: #17818b; }
.product-cost-summary .cost-loss { color: #a22d45; background: #fff1f3; border-color: #efcdd4; border-top-color: #c13b54; }
.product-cost-summary .cost-metric-description { margin-top: 8px; font-size: 10px; font-weight: 400; line-height: 1.5; }
.admin-products .product-summary { min-width: 0; }
.product-actions { position: relative; flex-shrink: 0; }
.product-actions[open] { z-index: 5; }
.product-actions > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 16px; border: 1px solid #cfddf2; border-radius: 10px; background: #f0f5ff; color: #24529a; font-size: 13px; font-weight: 650; cursor: pointer; list-style: none; }
.product-actions > summary::-webkit-details-marker { display: none; }
.product-actions > summary:hover, .product-actions[open] > summary { background: #e1ecff; border-color: #9dbbe6; }
.product-actions-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 240px; max-width: calc(100vw - 40px); padding: 6px; border: 1px solid #dce5f1; border-radius: 12px; background: #fff; box-shadow: 0 12px 32px #162d4f26; }
.product-actions-panel form { margin: 0; }
.product-actions-panel a, .product-actions-panel button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: #24529a; text-align: left; text-decoration: none; font-size: 13px; font-weight: 650; box-shadow: none; }
.product-actions-panel small { display: block; margin-top: 2px; font-size: 11px; font-weight: 400; }
.product-actions-panel a:hover, .product-actions-panel button:hover { background: #edf4ff; }
.product-actions-panel form:last-child { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.product-actions-panel .danger { color: #ae3149; }
.product-actions-panel .danger:hover { background: #fff1f3; }
@media (max-width: 600px) {
  .product-actions { flex-basis: 100%; }
  .product-actions > summary { width: fit-content; margin-left: auto; }
}
.admin-sidebar nav a:hover, .admin-sidebar nav a[aria-current] { color: #185adb; background: #edf4ff; }
.sidebar-tip { margin: 40px 0 20px; padding: 18px; background: #f3f7ff; border: 1px solid #e6eefb; border-radius: 12px; font-size: 12px; }
.sidebar-tip p { color: var(--muted); margin: 8px 0 0; }
.sidebar-logout { margin-top: auto; padding-top: 20px; }
.sidebar-logout button { width: 100%; }
.admin-shell { width: 100%; max-width: 1540px; margin: auto; padding: 38px clamp(20px, 3vw, 48px); }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.admin-eyebrow { color: #4774b1; font-size: 10px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; margin: 0 0 5px; }
h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.3; letter-spacing: -1px; }
h2 { font-size: 1.1rem; margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.header-description { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.header-store-link { border: 1px solid var(--line); background: white; padding: 9px 14px; border-radius: 9px; color: #405673; text-decoration: none; font-size: 12px; white-space: nowrap; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.order-dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.order-dashboard-card { display: grid; gap: 8px; padding: 18px; border: 1px solid #dce6f4; border-radius: 12px; background: #f5f9ff; color: #234a7a; text-decoration: none; font-size: 12px; font-weight: 650; }
.order-dashboard-card strong { font-size: 28px; line-height: 1.3; }
.order-dashboard-card:hover { border-color: #83a8dc; background: #eaf2ff; }
.order-dashboard-alert { color: #94334a; border-color: #efcdd4; background: #fff3f5; }
.order-dashboard-alert:hover { border-color: #cc7a8d; background: #ffe8ee; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 22px; display: flex; flex-direction: column; }
.stat-card > span { color: #60728a; font-size: 12px; font-weight: 600; }
.stat-card > strong { margin: 10px 0 4px; font-size: 34px; line-height: 1.2; letter-spacing: -1px; }
.stat-card em { font-size: 18px; font-style: normal; opacity: .7; }
.stat-card small { font-size: 10px; color: var(--muted); }
.stat-highlight { background: linear-gradient(125deg, #185adb, #0d3d9b); color: white; border-color: transparent; }
.stat-highlight > span, .stat-highlight small { color: #d3e2ff; }
.panel { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 26px; margin: 0 0 22px; box-shadow: 0 3px 12px #16345a03; }
.order-cancellation { overflow-wrap: anywhere; }
.order-cancellation article { padding-top: 12px; margin-top: 18px; border-top: 1px solid var(--line); }
.toolbar, .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.toolbar { justify-content: space-between; margin: 0 0 22px; }
.toolbar:last-child { margin: 22px 0 0; }
.toolbar .help { margin: 6px 0 0; }
.admin-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; align-items: end; padding: 18px 0 24px; border-top: 1px solid var(--line); }
.admin-filters label { margin: 0; font-size: 11px; }
.admin-filters input, .admin-filters select { padding: 10px; font-size: 12px; }
.admin-filters > a { align-self: center; margin-top: 22px; font-size: 12px; }
label { display: block; font-weight: 600; margin: 22px 0 8px; font-size: 13px; }
input, textarea, select { display: block; width: 100%; min-width: 0; margin-top: 7px; border: 1px solid #cfd9e7; color: var(--ink); background: #fff; padding: 12px; border-radius: 9px; }
input::placeholder, textarea::placeholder { color: #8c9aaf; }
input[type="file"] { font-size: 12px; border-style: dashed; padding: 16px 10px; background: #fafcff; }
textarea { resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; }
.checkbox input { width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px; accent-color: var(--blue); }
.color-picker { min-width: 0; margin: 22px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.color-picker legend { font-weight: 600; font-size: 13px; }
.color-options { display: flex; flex-wrap: wrap; gap: 10px; max-height: 320px; overflow-y: auto; padding: 5px; }
.color-option { align-items: center; margin: 8px 0 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; max-width: 100%; }
.color-option input { margin-top: 0; }
.color-option span { overflow-wrap: anywhere; min-width: 0; }
.color-swatch { display: inline-block; vertical-align: middle; flex-shrink: 0; }
input[type="color"] { width: 90px; height: 48px; padding: 5px; cursor: pointer; }
.notice { background: #e8f7ef; color: #225b41; border: 1px solid #c5e8d5; border-radius: 10px; padding: 16px; }
.error { background: #fff1f3; border-color: #efcdd4; color: #8e2638; }
.help { font-size: 12px; color: var(--muted); margin: 8px 0 0; line-height: 1.7; }
.product-row { display: flex; gap: 18px; align-items: center; padding: 20px 0; border-top: 1px solid var(--line); }
.product-row img, .product-no-image { box-sizing: border-box; width: 90px; height: 100px; padding: 6px; border-radius: 11px; object-fit: contain; object-position: center; flex-shrink: 0; background: #f5f8fc; }
.product-thumbnail { display: grid; justify-items: center; gap: 8px; flex-shrink: 0; }
.product-dimensions { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.product-dimensions legend { padding: 0 6px; font-weight: 650; }
.dimension-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.dimension-fields label { min-width: 0; }
.product-media-open { display: inline-flex; padding: 5px 10px; border: 1px solid #dfe8f8; border-radius: 8px; background: #f0f5ff; font-size: 12px; font-weight: 650; text-decoration: none; }
.product-media-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; width: min(94vw, 960px); max-height: 94vh; overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); }
.product-media-dialog::backdrop { background: #10233cbb; }
.product-media-dialog .toolbar { margin: 0 0 14px; }
.product-media-stage { display: grid; place-items: center; height: min(60vh, 620px); background: repeating-conic-gradient(#e3e8ef 0 25%, #fff 0 50%) 0 / 20px 20px; border-radius: 10px; }
.product-media-stage img, .product-media-stage video { box-sizing: border-box; display: block; width: 100%; height: 100%; min-height: 0; max-height: min(60vh, 620px); object-fit: contain; object-position: center; }
.product-media-stage img { padding: 16px; }
.product-media-controls { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }
.product-media-controls span { font-size: 13px; text-align: center; }
.product-media-dialog [hidden] { display: none; }
.product-no-image { display: grid; place-items: center; background: linear-gradient(130deg, #edf5ff, #dde9fa); color: #7693bb; font-weight: 800; font-size: 20px; }
.preview { display: block; width: 100%; max-height: 240px; border-radius: 12px; object-fit: contain; margin-top: 18px; background: #f6f8fc; }
img.preview { height: 240px; padding: 12px; object-position: center; }
.product-summary { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.product-summary h2 { font-size: 14px; }
.product-summary p { margin: 4px 0; font-size: 12px; }
.product-summary .product-code { font-size: 10px; color: var(--muted); }
.product-badges { display: flex; gap: 6px; flex-wrap: wrap; max-width: 170px; }
.status-badge { border-radius: 6px; padding: 4px 9px; font-size: 10px; font-weight: 700; }
.published { background: #e9f8ef; color: #287849; }
.hidden { background: #eff2f6; color: #68768b; }
.featured { background: #fff5dc; color: #846014; }
.actions { gap: 8px; }
.actions .button, .actions button { padding: 8px 12px; font-size: 12px; }
.empty-state { padding: 50px 15px; text-align: center; border-top: 1px solid var(--line); }
.empty-state p { color: var(--muted); font-size: 13px; }
.empty-mark { display: grid; place-items: center; width: 65px; height: 65px; margin: 0 auto 20px; border-radius: 18px; background: #edf4ff; color: #4982cf; font-size: 22px; font-weight: 800; }
.product-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.product-form .panel { margin: 0; }
.form-main, .form-side { display: contents; }
.kit-editor { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 28px; }
.kit-row { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.kit-row label { flex: 1; min-width: 120px; }
.kit-row .kit-remove { font-size: 11px; margin-bottom: 8px; }
.kit-remove[hidden], #kit-add[hidden] { display: none; }
.categories-layout { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.6fr); gap: 24px; align-items: start; }
.categories-layout > .panel { min-width: 0; }
.category-form-actions { margin-top: 22px; }
.category-row:first-of-type { margin-top: 20px; }
.form-footer { grid-column: 1 / -1; display: flex; gap: 12px; justify-content: flex-end; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.auth-layout { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at 15% 0, #dceaff, transparent 65%), #f5f8fd; }
.auth-layout .admin-shell { max-width: 540px; padding: 40px 24px; }
.auth-layout .admin-header { display: block; text-align: center; }
.auth-layout .header-store-link { display: inline-block; margin-top: 18px; }
.auth-layout .panel { padding: 30px; }
.login-panel label:first-of-type { margin-top: 0; }
.login-panel button { margin-top: 20px; width: 100%; }
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-filters > a { margin: 0; }
    .product-row { flex-wrap: wrap; }
    .categories-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
    .admin-layout { padding: 0; }
    .admin-sidebar { position: static; width: 100%; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-sidebar nav { display: grid; gap: 14px; margin-top: 20px; }
    .sidebar-submenu { position: static; width: 100%; margin-top: 6px; box-shadow: none; }
    .sidebar-group[open] .sidebar-arrow { transform: rotate(90deg); }
    .admin-sidebar nav a { font-size: 11px; padding: 9px; }
    .sidebar-tip { display: none; }
    .sidebar-logout { position: absolute; top: 20px; right: 20px; padding: 0; }
    .sidebar-logout button { padding: 8px 12px; font-size: 11px; }
    .admin-shell { padding: 26px 20px; }
}
@media (min-width: 801px) and (max-height: 580px) {
    .admin-layout { padding-left: 0; }
    .admin-sidebar { position: relative; width: 100%; padding: 18px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
    .sidebar-submenu { top: 100%; left: 0; width: 100%; }
    .sidebar-tip { display: none; }
    .sidebar-logout { position: absolute; top: 20px; right: 24px; padding: 0; }
}
@media (max-width: 480px) {
    .admin-header { align-items: flex-start; flex-direction: column; gap: 12px; }
    .stats-grid { gap: 10px; }
    .stat-card { padding: 16px; }
    .stat-card > span { font-size: 11px; }
    .stat-card small { font-size: 10px; }
    .panel { padding: 18px; }
    .product-row { gap: 12px; }
    .product-badges, .actions { width: 100%; max-width: none; }
    .admin-filters { grid-template-columns: minmax(0, 1fr); }
    .admin-filters > a { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
.admin-media-item { border-top: 1px solid #dce5f1; padding-top: 16px; margin-top: 16px; }
.admin-media-item video { width: 100%; }
.admin-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 18px 0 22px; }
.admin-media-card { position: relative; min-width: 0; overflow: hidden; margin: 0; aspect-ratio: 1 / 1; border: 1px solid #dce5f1; border-radius: 14px; background: #f3f6fb; box-shadow: 0 3px 12px rgba(17, 45, 84, .07); }
.admin-media-card[hidden] { display: none; }
.admin-media-thumb { display: block; width: 100%; height: 100%; object-fit: contain; background: #eef3fa; }
.admin-media-card video.admin-media-thumb { object-fit: contain; }
.admin-media-badge { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 5px 9px; border-radius: 999px; color: #fff; background: rgba(10, 39, 79, .82); font-size: 11px; font-weight: 750; backdrop-filter: blur(4px); }
.admin-media-remove { position: absolute; right: 9px; top: 9px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #c9342f; box-shadow: 0 3px 10px rgba(88, 13, 13, .28); font-size: 23px; line-height: 1; }
.admin-media-remove:hover { background: #a9221e; transform: scale(1.05); }
.admin-media-remove:focus-visible { outline: 3px solid #f8b4b1; outline-offset: 2px; }
.admin-media-removal-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 20px; padding: 11px 14px; border: 1px solid #f2c5c2; border-radius: 10px; color: #78231f; background: #fff4f3; }
.admin-media-removal-status[hidden] { display: none; }
.admin-media-removal-status button { flex: 0 0 auto; min-height: 36px; padding: 7px 12px; }
.upload-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); gap: 12px; margin: 12px 0 18px; }
.upload-preview[hidden] { display: none; }
.upload-preview-card { min-width: 0; margin: 0; padding: 10px; border: 1px solid #dce5f1; border-radius: 12px; background: #f8faff; }
.upload-preview-card img, .upload-preview-card video { display: block; width: 100%; height: 150px; object-fit: contain; border-radius: 8px; background: #eef3fa; }
.upload-preview-card figcaption { overflow-wrap: anywhere; margin-top: 8px; color: #17335c; font-size: 12px; line-height: 1.4; }
.upload-preview-card.has-warning { border-color: #d97706; background: #fff8eb; }
.upload-preview-warning { grid-column: 1 / -1; margin: 0; color: #a13d00; font-weight: 650; }
@media (max-width: 600px) {
  .admin-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-media-removal-status { align-items: flex-start; flex-direction: column; }
}
.profile-panel { max-width: 720px; }
.product-photo-dialog { position: fixed; inset: 0; margin: auto; width: min(94vw, 820px); max-height: 92vh; overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); }
.product-photo-dialog::backdrop { background: #10233cbb; }
.photo-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-block: 16px; }
.photo-comparison figure { min-width: 0; margin: 0; }
.photo-comparison img { box-sizing: border-box; width: 100%; height: 260px; padding: 16px; object-fit: contain; object-position: center; background: repeating-conic-gradient(#e3e8ef 0 25%, #fff 0 50%) 0 / 20px 20px; border-radius: 8px; }
.photo-comparison figcaption { font-size: 12px; font-weight: 650; margin-bottom: 8px; }
@media (max-width: 600px) { .photo-comparison { grid-template-columns: minmax(0, 1fr); } }
.ai-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 240px)); gap: 18px; margin: 20px 0; }
.ai-preview { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8fc; }
.ai-preview img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: #fff; margin-bottom: 12px; }
.ai-preview-open { display: block; position: relative; color: #24529a; text-align: center; text-decoration: none; cursor: zoom-in; }
.ai-preview-open span { display: block; margin: -4px 0 12px; font-size: 12px; font-weight: 650; }
.ai-preview label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
.ai-preview input { width: auto; }
.ai-image-dialog { position: fixed; inset: 0; margin: auto; width: min(94vw, 900px); max-height: 94vh; overflow-y: auto; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 20px 70px #162d4f40; }
.ai-image-dialog::backdrop { background: #10233cbb; }
.ai-image-dialog .toolbar { margin: 0 0 12px; }
.ai-image-dialog > img { display: block; width: 100%; max-height: 72vh; object-fit: contain; }
.ai-preview img, .ai-image-dialog > img { background-color: #fff; background-image: conic-gradient(#e3e8ef 25%, transparent 0 50%, #e3e8ef 0 75%, transparent 0); background-size: 20px 20px; }
[data-ai-generate] button:disabled { opacity: .6; cursor: not-allowed; }
.user-form { margin-top: 20px; }
.order-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.order-stages a { display: grid; padding: 16px; border: 1px solid var(--line); background: white; border-radius: 12px; text-decoration: none; font-size: 12px; }
.order-stages strong { font-size: 24px; }
.order-status-new { --tone: #185adb; --tint: #edf4ff; }
.order-status-review { --tone: #7a3fc4; --tint: #f4edfd; }
.order-status-approved { --tone: #0f7c86; --tint: #e6f6f7; }
.order-status-production { --tone: #98610c; --tint: #fff5df; }
.order-status-ready { --tone: #3d7a12; --tint: #eef8e3; }
.order-status-shipped { --tone: #0b6e8a; --tint: #e4f5fa; }
.shipment-panel textarea { width: 100%; }
.shipment-send { align-items: center; margin-top: 12px; }
.order-status-delivered { --tone: #11754f; --tint: #e9f8ef; }
.order-status-cancelled { --tone: #a3263a; --tint: #fdecee; }
.order-stages .order-stage { position: relative; gap: 2px; border-top: 4px solid var(--tone); color: var(--tone); }
.order-stages .order-stage span { font-weight: 650; }
.order-stages .order-stage:hover, .order-stages .order-stage[aria-current="page"] { background: var(--tint); border-color: var(--tone); }
.order-stages .order-stage-empty { color: var(--muted); }
.order-stages .order-stage small { font-size: 11px; font-weight: 650; }
.order-stages .order-status-new:not(.order-stage-empty)::after { content: ""; position: absolute; top: 14px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 0 #185adb66; animation: order-new-pulse 1.8s infinite; }
.order-stages .order-status-cancelled:not(.order-stage-empty) { background: var(--tint); }
@keyframes order-new-pulse { 70% { box-shadow: 0 0 0 10px #185adb00; } 100% { box-shadow: 0 0 0 0 #185adb00; } }
.order-row { margin: 0 -16px; padding: 18px 16px 18px 20px; border-left: 4px solid var(--tone); border-radius: 0 10px 10px 0; }
.order-row.order-status-new { background: var(--tint); }
.order-row.order-status-cancelled { background: #fbf6f7; }
.order-row-actions { display: grid; justify-items: end; gap: 8px; }
.order-delete summary { cursor: pointer; color: #a3263a; font-size: .85rem; font-weight: 700; list-style: none; }
.order-delete summary::-webkit-details-marker { display: none; }
.order-delete[open] form { margin-top: 8px; padding: 12px 14px; border: 1px solid #f1c4cc; border-radius: 10px; background: #fff5f6; max-width: 320px; }
.order-delete form p { margin: 0 0 10px; font-size: .85rem; }
.order-delete-all { margin: 0 0 16px; }
.order-delete-all summary { display: inline-block; padding: 8px 14px; border: 1px solid #f1c4cc; border-radius: 10px; background: #fff5f6; }
.order-delete-all[open] form { max-width: 560px; }
.order-row.order-status-cancelled h2 { color: var(--muted); text-decoration: line-through; text-decoration-color: #a3263a80; }
.order-row-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.order-row-code { font-weight: 700; }
.order-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--tone); border-radius: 999px; background: var(--tint); color: var(--tone); font-size: 12px; font-weight: 700; }
.order-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.order-overdue { --tone: #fff; --tint: #c2410c; border-color: #c2410c; }
.order-origin { color: var(--muted); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .order-stages .order-status-new::after { animation: none; } }
.order-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.order-item { display: grid; grid-template-columns: minmax(160px, 2fr) repeat(3, minmax(90px, 1fr)); gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.order-item label, .order-fields label { min-width: 0; }
.order-item-product { grid-column: 1 / -1; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center; }
.order-item-product label { margin: 0; }
.order-item-photo { display: grid; place-items: center; width: 104px; aspect-ratio: 1; overflow: hidden; border: 1px solid #d5e0ef; border-radius: 13px; background: #f2f6fc; color: #647895; font-size: 12px; font-weight: 700; text-align: center; }
.order-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.order-item button { justify-self: start; }
#order-total { padding: 16px; background: #edf4ff; border-radius: 10px; font-weight: 650; }
.order-catalog { margin: 28px 0 8px; padding: 20px; border: 1px solid #cddbf1; border-radius: 14px; background: #f8fbff; }
.order-catalog[hidden], .order-floating-total[hidden] { display: none; }
.order-catalog h2 { margin-top: 0; }
.order-catalog-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); align-items: end; gap: 16px; margin-bottom: 8px; }
.order-catalog-filters { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 10px; }
.order-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.order-back { margin-bottom: 4px; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 24px 0 8px; }
.pager[hidden] { display: none; }
.pager a, .pager button { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px; border: 1px solid #cdd9e9; border-radius: 10px; background: #fff; color: #1554bc; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: none; }
.pager a:hover, .pager button:hover { border-color: var(--blue); background: #edf4ff; box-shadow: none; }
.pager [aria-current="page"], .pager [aria-current="page"]:hover { border-color: var(--blue); background: var(--blue); color: #fff; }
.pager-gap { color: var(--muted); padding: 0 2px; }
.order-limit { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; border-left: 4px solid #0f7c86; }
.order-limit h2 { margin-top: 0; }
.order-limit p { margin-bottom: 0; }
.order-limit > div { flex: 1 1 360px; }
.order-limit-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.order-limit-form label { margin: 0; }
.tracking-share { border-top: 4px solid #185adb; }
.tracking-share .affiliate-share { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin: 14px 0; }
.tracking-share .affiliate-share label { min-width: 0; margin: 0; }
.tracking-share .affiliate-share input { width: 100%; min-width: 0; font-size: 13px; }
.tracking-share .affiliate-share > p { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.tracking-regenerate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.tracking-regenerate small { margin: 0; }
@media (max-width: 600px) { .tracking-share .affiliate-share { grid-template-columns: minmax(0, 1fr); } }
.receipt-viewer { position: fixed; inset: 0; margin: auto; width: min(720px, calc(100vw - 32px)); max-width: none; height: fit-content; max-height: calc(100vh - 32px);
    display: none; flex-direction: column; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 24px 60px #0f2a4d40; }
.receipt-viewer[open] { display: flex; }
.receipt-viewer::backdrop { background: #0f2a4d99; }
.receipt-viewer header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.receipt-viewer h2 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.receipt-viewer header p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.receipt-viewer-close { flex-shrink: 0; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: #f0f5ff; color: #24529a; font-size: 22px; line-height: 1; }
.receipt-viewer-close:hover { background: #e1ecff; }
.receipt-viewer-body { flex: 1 1 auto; min-height: 120px; overflow: auto; padding: 16px; background: #f5f8fc; text-align: center; }
.receipt-viewer-body img { display: block; max-width: 100%; max-height: calc(100vh - 220px); margin: 0 auto; border-radius: 10px; background: #fff; box-shadow: 0 4px 16px #163d7014; object-fit: contain; }
.receipt-viewer-note { margin: 24px 0; color: var(--muted); }
.receipt-viewer-pdf { display: grid; justify-items: center; gap: 12px; padding: 24px 8px; }
.receipt-viewer-pdf span { display: grid; place-items: center; width: 64px; height: 72px; border-radius: 10px; background: #fdecee; color: #ae3149; font-weight: 800; }
.receipt-viewer-pdf p { margin: 0; color: var(--muted); }
.receipt-viewer footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
@media (max-width: 520px) { .receipt-viewer footer > * { flex: 1 1 100%; } }
.receipts-list { list-style: none; margin: 12px 0; padding: 0; }
.receipts-list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.receipts-list small { color: var(--muted); font-size: 12px; }
.receipt-flag { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: #fff5df; color: #98610c; font-size: 12px; font-weight: 700; text-decoration: none; }
.pix-sample code { display: block; padding: 12px; border-radius: 8px; background: #f5f8fc; font-size: 12px; overflow-wrap: anywhere; }
.marketing-warning { border-left: 4px solid #c2410c; background: #fffaf3; }
.marketing-warning ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.marketing-live { font-weight: 650; }
.marketing-campaign { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.marketing-campaign h3 { margin: 0; }
.marketing-campaign-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.marketing-campaign .actions[hidden] { display: none; }
.marketing-campaign progress { width: 100%; height: 12px; accent-color: #11754f; }
.marketing-campaign p { margin: 0; }
.marketing-message { padding: 12px; border-radius: 10px; background: #f5f8fc; overflow-wrap: anywhere; }
.marketing-badge-running { color: #185adb; background: #edf4ff; border-color: #a9c6f5; }
.marketing-badge-paused { color: #98610c; background: #fff5df; border-color: #e6c77e; }
.marketing-badge-finished { color: #11754f; background: #e9f8ef; border-color: #9bd4b2; }
.marketing-badge-cancelled { color: #a3263a; background: #fdecee; border-color: #f0b4bd; }
.marketing-compose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.marketing-compose textarea { width: 100%; box-sizing: border-box; }
.marketing-preview-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 650; }
.marketing-preview { min-height: 180px; padding: 14px 16px; border-radius: 4px 14px 14px 14px; background: #dcf8c6; color: #111b21; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 1px 2px #0000001f; }
.marketing-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.marketing-controls [hidden] { display: none; }
.marketing-image { display: grid; gap: 6px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.marketing-image legend { padding: 0 4px; font-size: 13px; font-weight: 650; }
.marketing-image input[type="file"][hidden] { display: none; }
.marketing-preview img { display: block; width: 100%; max-height: 260px; margin-bottom: 10px; border-radius: 8px; object-fit: contain; background: #fff; }
.marketing-preview img[hidden] { display: none; }
#marketing-form h3 { margin: 24px 0 0; }
@media (max-width: 800px) { .marketing-compose { grid-template-columns: minmax(0, 1fr); } }
.whatsapp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.whatsapp-cards .panel { display: grid; gap: 6px; align-content: start; margin: 0; }
.whatsapp-cards span { color: var(--muted); font-size: 13px; }
.whatsapp-cards strong { font-size: 22px; }
.whatsapp-cards small { color: var(--muted); overflow-wrap: anywhere; }
.whatsapp-ok { color: #11754f; }
.whatsapp-bad { color: #ae3149; }
.whatsapp-table-wrap { overflow-x: auto; }
.whatsapp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.whatsapp-table th, .whatsapp-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.whatsapp-table td small { display: block; margin-top: 4px; color: var(--muted); }
.whatsapp-table details p { margin: 6px 0 0; overflow-wrap: anywhere; }
.whatsapp-table form { margin-top: 6px; }
.whatsapp-status { display: inline-block; padding: 3px 9px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.whatsapp-sent { color: #11754f; background: #e9f8ef; border-color: #9bd4b2; }
.whatsapp-pending, .whatsapp-sending { color: #185adb; background: #edf4ff; border-color: #a9c6f5; }
.whatsapp-retry { color: #98610c; background: #fff5df; border-color: #e6c77e; }
.whatsapp-failed { color: #a3263a; background: #fdecee; border-color: #f0b4bd; }
.order-catalog-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.order-catalog-card img, .order-catalog-placeholder { display: grid; place-items: center; width: 100%; height: 130px; object-fit: contain; padding: 8px; box-sizing: border-box; border-radius: 8px; background: #f5f8fc; color: #9db1cc; font-weight: 800; letter-spacing: 2px; }
.order-catalog-card h3 { margin: 10px 0 2px; font-size: 15px; overflow-wrap: anywhere; }
.order-catalog-card .help { margin: 0 0 6px; font-size: 12px; }
.order-catalog-hidden { align-self: flex-start; margin-bottom: 6px; padding: 2px 8px; border-radius: 6px; background: #fff5df; color: #98610c; font-size: 11px; font-weight: 700; }
.order-catalog-option { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 8px; padding-top: 10px; margin-top: auto; border-top: 1px solid var(--line); font-size: 12px; }
.order-catalog-option + .order-catalog-option { margin-top: 10px; }
.order-catalog-option > span { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.order-catalog-option > span br { display: none; }
.order-catalog-option strong { font-size: 14px; color: var(--ink); }
.order-catalog-option input { width: 100%; min-width: 0; margin: 0; padding: 8px; box-sizing: border-box; }
.order-catalog-option button { padding: 8px 12px; }
.order-item-added { animation: order-item-added 1.6s ease-out; }
@keyframes order-item-added { from { background: #e3f6ea; } to { background: transparent; } }
.order-floating-total { position: fixed; right: 24px; bottom: 20px; z-index: 15; display: grid; gap: 8px; width: 340px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow-y: auto; box-sizing: border-box; padding: 16px 18px; border: 1px solid #cddbf1; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px #163d7026; font-size: 13px; }
.order-floating-total strong { color: var(--blue); font-size: 14px; }
.order-floating-total ul { list-style: none; margin: 0; padding: 0; max-height: 160px; overflow-y: auto; }
.order-floating-total li { padding: 6px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.order-floating-total p { margin: 0; font-weight: 650; }
.order-step-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.order-step-nav button[hidden] { display: none; }
#order-form[data-step="products"] > :not(.order-catalog):not(.order-step-nav):not(input) { display: none; }
#order-form[data-step="products"] .order-catalog { margin-top: 8px; }
#order-form[data-step="cart"] > .order-catalog { display: none; }
#order-form[data-step="products"] { padding-bottom: 150px; }
#order-form[data-step="products"] .order-catalog { border: 0; padding: 0; background: transparent; }
@media (max-width: 700px) { .order-catalog-head { grid-template-columns: minmax(0, 1fr); } .order-catalog { padding: 14px; } .order-floating-total { right: 16px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .order-item-added { animation: none; } }
@media (max-width: 1000px) { .order-item { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .order-fields, .order-item { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .order-item-product { grid-template-columns: 74px minmax(0, 1fr); gap: 10px; } .order-item-photo { width: 74px; border-radius: 10px; } }
.coupon-products { max-height: 320px; overflow-y: auto; margin-block: 18px; padding: 14px; border: 1px solid #dce5f1; border-radius: 10px; }
.cost-dialog { position: fixed; inset: 0; margin: auto; width: min(94vw, 700px); max-height: 90vh; overflow-y: auto; padding: 26px; border: 1px solid #dce5f1; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 20px 70px #162d4f40; }
.cost-dialog::backdrop { background: #10233caa; }
.cost-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 0 18px; }
.energy-calculator { min-width: 0; padding: 18px; margin: 18px 0; border: 1px solid #dce5f1; border-radius: 12px; background: #f8fbff; }
.energy-calculator legend { padding: 0 8px; font-weight: 650; }
.energy-calculator [hidden] { display: none; }
[data-cost-input="energy_cost"]:read-only { background: #edf4ff; color: #174e97; }
.cost-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; margin-block: 22px; }
.cost-results > div { padding: 16px; background: #f3f7fc; border: 1px solid var(--line); border-radius: 12px; }
.cost-results dt { color: #52657e; font-size: 12px; }
.cost-results dd { margin: 6px 0 0; font-size: 20px; font-weight: 750; overflow-wrap: anywhere; }
.cost-results .cost-price { background: #edf8f1; border-color: #b6d9c4; color: #17613c; }
/* Cadastro de produto em etapas numeradas: cada etapa tem sua cor, repetida no guia do topo. */
.step-1 { --tone: #185adb; --tint: #edf4ff; }
.step-2 { --tone: #0f7c86; --tint: #e6f6f7; }
.step-3 { --tone: #7a3fc4; --tint: #f4edfd; }
.step-4 { --tone: #98610c; --tint: #fff5df; }
.step-5 { --tone: #c2410c; --tint: #fff0e8; }
.step-6 { --tone: #11754f; --tint: #e9f8ef; }
.product-step[hidden], .form-footer [hidden] { display: none; }
.product-step h2:focus { outline: none; }
.product-guide a[aria-current="step"] { background: var(--tone); color: #fff; }
.product-guide a[aria-current="step"] .step-number { background: #fff; color: var(--tone); }
.product-guide a.is-done .step-number { font-size: 0; }
.product-guide a.is-done .step-number::after { content: "✓"; font-size: 14px; }
.product-guide { grid-column: 1 / -1; min-width: 0; }
.product-guide ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.product-guide a { display: flex; align-items: center; gap: 8px; height: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--tone); border-radius: 10px; background: var(--tint); color: var(--tone); font-size: 12px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.product-guide a:hover { box-shadow: inset 0 0 0 1px var(--tone); }
.step-number { display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--tone); color: #fff; font-size: 14px; font-weight: 800; line-height: 1; }
.product-step { border-top: 4px solid var(--tone); scroll-margin-top: 16px; min-width: 0; }
.step-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.step-head h2 { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--tone); }
.step-tag { padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--tone); font-size: 10px; font-weight: 750; white-space: nowrap; }
.step-tag-required { background: var(--tone); color: #fff; }
.step-tip { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--tone); border-radius: 6px; background: var(--tint); color: var(--ink); font-size: 12px; line-height: 1.6; }
.form-footer { flex-wrap: wrap; align-items: center; }
.form-footer .help { margin: 0 auto 0 0; }
@media (max-width: 1200px) { .product-guide ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .product-guide ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Pagina do chat com IA. */
.chat-admin-actions { margin-top: 18px; }
.chat-admin-conversation { padding: 12px 0; border-top: 1px solid var(--line); }
.chat-admin-conversation summary { cursor: pointer; font-size: 13px; font-weight: 650; }
.chat-admin-message { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-admin-user { background: #edf4ff; }
.chat-admin-assistant { background: #f3f6fa; }
/* Textos de produto com IA, na etapa 1 do cadastro. */
.ai-copy { margin-top: 14px; padding: 16px; border: 1px dashed #bcd0ee; border-radius: 12px; background: #f8fbff; }
.ai-copy[hidden], .ai-copy [hidden] { display: none; }
.ai-copy-status { margin: 10px 0 0; font-size: 13px; font-weight: 600; }
.ai-copy-status:empty { display: none; }
.ai-copy [data-ai-copy-undo] { margin-top: 10px; }
.ai-copy-review { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-copy-title { margin: 0 0 14px; font-weight: 700; overflow-wrap: anywhere; }
.ai-copy-text { margin: 0 0 14px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-admin-results { margin: 16px 0 0; }

/* Pagamento online (Asaas) no pedido */
.asaas-table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.asaas-table th, .asaas-table td { padding: 8px 10px; border-bottom: 1px solid #e3eaf3; text-align: left; white-space: nowrap; }

/* Leve mais, pague menos */
.tier-off { align-self: center; min-width: 56px; margin-top: 22px; color: #11754f; font-weight: 800; font-size: 13px; }
.tier-off-bad { color: #a3263a; font-weight: 650; font-size: 12px; }
#tier-add[hidden] { display: none; }
/* Situacao dos cupons */
.coupon-row { position: relative; padding-left: 18px; }
.coupon-row::before { content: ""; position: absolute; inset: 16px auto 16px 0; width: 4px; border-radius: 4px; background: #d5dbe3; }
.coupon-row.coupon-active::before { background: linear-gradient(180deg, #1fa855, #57d08b); }
.coupon-row.coupon-ending::before { background: linear-gradient(180deg, #e08a00, #f5c04a); }
.coupon-row.coupon-scheduled::before { background: linear-gradient(180deg, #185adb, #5c9bff); }
.coupon-row.coupon-off::before { background: linear-gradient(180deg, #c8102e, #ef6b7e); }
.coupon-row.coupon-ended, .coupon-row.coupon-off { opacity: .78; }
.coupon-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0 10px; }
.coupon-status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; box-shadow: 0 1px 0 #ffffff inset, 0 2px 6px #0b2a4f12; }
.coupon-status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.coupon-status-time { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #f3f6fa; color: #4a5a72; font-size: 12px; font-weight: 700; }
.coupon-status-time svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.coupon-status-bar { flex: 1 1 140px; max-width: 220px; height: 6px; border: 0; border-radius: 6px; background: #e8edf5; appearance: none; overflow: hidden; }
.coupon-status-bar::-webkit-progress-bar { border-radius: 6px; background: #e8edf5; }
.coupon-status-bar::-webkit-progress-value { border-radius: 6px; background: linear-gradient(90deg, #1fa855, #57d08b); }
.coupon-status-bar::-moz-progress-bar { border-radius: 6px; background: linear-gradient(90deg, #1fa855, #57d08b); }
.coupon-status-ending .coupon-status-bar::-webkit-progress-value { background: linear-gradient(90deg, #f5c04a, #e08a00); }
.coupon-status-ending .coupon-status-bar::-moz-progress-bar { background: linear-gradient(90deg, #f5c04a, #e08a00); }
.coupon-status-active .coupon-status-pill { background: linear-gradient(135deg, #e9f8ef, #d3f3df); color: #0f7042; }
.coupon-status-active .coupon-status-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #1fa855; opacity: 0; animation: coupon-dot-ping 1.8s ease-out infinite; }
.coupon-status-ending .coupon-status-pill { background: linear-gradient(135deg, #fff3d6, #ffe4a8); color: #8a5200; }
.coupon-status-ending .coupon-status-time { background: #fff3d6; color: #8a5200; }
.coupon-status-ending .coupon-status-dot { animation: coupon-dot-blink 1.2s ease-in-out infinite; }
.coupon-status-scheduled .coupon-status-pill { background: linear-gradient(135deg, #edf4ff, #dbe8ff); color: #124798; }
.coupon-status-ended .coupon-status-pill { background: #eef1f5; color: #5a6676; }
.coupon-status-off .coupon-status-pill { background: linear-gradient(135deg, #fff0f2, #ffdde2); color: #a3263a; }
@keyframes coupon-dot-ping { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes coupon-dot-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .coupon-status-dot, .coupon-status-dot::after { animation: none; } }
/* Compartilhar cupom */
.coupon-share { margin-top: 10px; }
.coupon-share summary { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid #c9daf3; border-radius: 999px; background: linear-gradient(135deg, #f3f8ff, #fff); color: #124798; font-size: 13px; font-weight: 800; cursor: pointer; list-style: none; box-shadow: 0 2px 8px #0b2a4f0d; }
.coupon-share summary::-webkit-details-marker { display: none; }
.coupon-share summary:hover { border-color: #185adb; }
.coupon-share[open] summary { border-color: #185adb; background: #185adb; color: #fff; }
.coupon-share-body { display: grid; gap: 14px; margin-top: 12px; padding: 16px; border: 1px solid #dbe6f5; border-radius: 14px; background: #f8fbff; }
.coupon-share-field { display: grid; gap: 6px; }
.coupon-share-field label { color: #13284a; font-size: 12px; font-weight: 800; }
.coupon-share-row { display: flex; gap: 8px; }
.coupon-share-row input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px dashed #b9cde9; border-radius: 10px; background: #fff; color: #124798; font: 600 13px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.coupon-share-field textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d3deee; border-radius: 10px; background: #fff; color: #13284a; font: inherit; font-size: 13px; resize: vertical; }
.coupon-share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.coupon-share-whatsapp { border-color: #1fa855; background: #1fa855; color: #fff; }
.coupon-share-whatsapp:hover { background: #17924a; }
.coupon-share-status { margin: 0; color: #0f7042; font-size: 12px; font-weight: 700; }
.coupon-share-status:empty { display: none; }
@media (max-width: 560px) { .coupon-share-row { flex-direction: column; } }
.store-photo-preview { display: block; width: 100%; max-height: 220px; margin: 0 0 14px; border-radius: 12px; object-fit: cover; }
/* Etapa 3 do produto: cartoes de caracteristicas */
.spec-groups { display: grid; gap: 16px; margin-top: 18px; }
.spec-card { padding: 18px 20px; border: 1px solid #e2e8f2; border-radius: 16px; background: linear-gradient(180deg, #fff, #fbfcfe); box-shadow: 0 6px 18px #0b2a4f0a; }
.spec-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.spec-card-head > div { flex: 1; min-width: 0; }
.spec-card-head h3 { margin: 0; color: #13284a; font-size: 15px; }
.spec-card-head p { margin: 2px 0 0; color: #6a7b94; font-size: 12px; }
.spec-card-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #f2edfc; font-size: 19px; }
.spec-grid { display: grid; gap: 14px; }
.spec-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.spec-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.spec-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spec-grid label { min-width: 0; margin: 0; }
.spec-grid label small { color: #8a99ad; font-weight: 500; }
.spec-card > .help { margin: 10px 0 0; }
.unit-input { position: relative; display: block; margin-top: 6px; }
.unit-input input { width: 100%; padding-right: 46px; }
.unit-input .unit { position: absolute; top: 50%; right: 8px; padding: 3px 8px; border-radius: 8px; background: #eef2f8; color: #5a6a82; font-size: 12px; font-weight: 800; transform: translateY(-50%); pointer-events: none; }
.spec-card-shipping { border-color: #d8e4f5; }
.spec-card-shipping .spec-card-icon { background: #e8f1ff; }
.spec-card-shipping[data-state=on] { border-color: #9fd9b8; background: linear-gradient(180deg, #f6fcf8, #fff); }
.ship-status { flex-shrink: 0; padding: 5px 12px; border-radius: 999px; background: #f1f3f6; color: #5a6676; font-size: 12px; font-weight: 800; white-space: nowrap; }
.spec-card-shipping[data-state=on] .ship-status { background: #e9f8ef; color: #0f7042; }
.spec-card-shipping[data-state=partial] .ship-status { background: #fff3d6; color: #8a5200; }
.spec-colors { margin: 0 0 14px; padding: 14px; border: 1px dashed #d8e1ee; border-radius: 12px; background: #fff; }
@media (max-width: 900px) { .spec-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .spec-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .spec-grid-2, .spec-grid-3, .spec-grid-4 { grid-template-columns: minmax(0, 1fr); } .spec-card-head { flex-wrap: wrap; } }
/* Etapa 4 do produto: preco, descontos e kits */
.price-groups .spec-card-icon { background: #fff3d6; }
.price-groups .kit-editor { margin-top: 0; padding-top: 18px; border-top: 1px solid #e2e8f2; }
.price-groups .spec-card-head .admin-eyebrow { margin: 0 0 2px; }
.price-main { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px 22px; align-items: end; }
.price-field { margin: 0; color: #13284a; font-weight: 700; }
.price-field small { color: #8a99ad; font-weight: 500; }
.price-field input { font-size: 20px; font-weight: 800; color: #13284a; }
.price-calc { display: grid; gap: 6px; }
.price-calc #cost-open { justify-self: start; display: inline-flex; align-items: center; gap: 8px; }
.price-calc .help { margin: 0; }
.price-subtitle { margin: 18px 0 8px; padding-top: 14px; border-top: 1px dashed #e2e8f2; color: #13284a; font-size: 13px; font-weight: 800; }
.price-subtitle small { color: #8a99ad; font-weight: 600; }
.unit-prefix input { padding-left: 46px; padding-right: 12px; }
.unit-prefix .unit { right: auto; left: 8px; }
.editor-rows { display: grid; gap: 10px; }
.price-groups .kit-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: end; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid #e8edf5; border-radius: 12px; background: #fff; }
.price-groups .kit-editor:not(.tier-editor) .kit-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.price-groups .kit-row label { min-width: 0; margin: 0; }
.price-groups .kit-row .kit-remove { margin: 0 0 6px; }
.price-groups .tier-off { margin: 0 0 12px; padding: 4px 10px; border-radius: 999px; background: #e9f8ef; text-align: center; }
.price-groups .tier-off:empty { padding: 0; background: none; }
.price-groups .tier-off.tier-off-bad { background: #fff0f2; }
.editor-add { margin-top: 10px; border-style: dashed; }
@media (max-width: 700px) { .price-main { grid-template-columns: minmax(0, 1fr); } .price-groups .kit-row, .price-groups .kit-editor:not(.tier-editor) .kit-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .price-groups .kit-row .kit-remove, .price-groups .tier-off { grid-column: 1 / -1; justify-self: start; } }
/* Catalogo de produtos (admin/index.php): cartoes premium */
.admin-products { display: grid; gap: 14px; margin-top: 18px; }
.admin-products > .product-row { position: relative; flex-wrap: wrap; gap: 16px 20px; padding: 18px 20px 14px 24px; border: 1px solid #e2e8f2; border-radius: 18px; background: #fff; box-shadow: 0 6px 18px #0b2a4f0a; transition: box-shadow .2s, border-color .2s; }
.admin-products > .product-row::before { content: ""; position: absolute; inset: 16px auto 16px 0; width: 4px; border-radius: 0 4px 4px 0; background: #c3ccd8; }
.admin-products > .product-row.is-published::before { background: linear-gradient(180deg, #1fa855, #57d08b); }
.admin-products > .product-row:hover { border-color: #cdd9ea; box-shadow: 0 14px 30px #0b2a4f14; }
.admin-products > .product-row.is-hidden { background: #fbfcfe; }
.admin-products .product-thumbnail img, .admin-products .product-no-image { width: 96px; height: 96px; padding: 0; border-radius: 14px; object-fit: cover; box-shadow: 0 4px 12px #0b2a4f14; }
.admin-products .product-media-open { padding: 4px 10px; border-radius: 999px; font-size: 11px; }
.admin-products .product-summary { flex: 1; min-width: 0; }
.admin-products .product-summary .product-code { display: inline-flex; margin: 0; padding: 3px 9px; border-radius: 999px; background: #f1f4f9; color: #5a6a82; font-size: 11px; font-weight: 700; }
.admin-products .product-summary h2 { margin: 6px 0 4px; color: #0f2547; font-size: 17px; }
.product-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.product-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid #e3e9f2; border-radius: 999px; background: #f8fafc; color: #4a5a72; font-size: 11.5px; font-weight: 700; }
.product-chip.chip-ready { border-color: #bfe6cf; background: #effaf4; color: #0f7042; }
.product-chip.chip-request { border-color: #ead9f7; background: #f8f2fd; color: #6634a0; }
.product-chip.chip-empty { border-color: #f1c4cc; background: #fff0f2; color: #a3263a; }
.product-chip.chip-tier { border-color: #bfe6cf; background: #e9f8ef; color: #0f7042; }
.admin-products .product-cost-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.admin-products .product-cost-summary > div { padding: 8px 10px; border-top-width: 0; border-left-width: 3px; border-radius: 10px; }
.admin-products .product-cost-summary .cost-metric-cost { border-left-color: #b77916; }
.admin-products .product-cost-summary .cost-metric-markup { border-left-color: #8750b8; }
.admin-products .product-cost-summary .cost-metric-sale { border-left-color: #2563eb; }
.admin-products .product-cost-summary .cost-metric-profit { border-left-color: #238653; }
.admin-products .product-cost-summary .cost-metric-margin { border-left-color: #17818b; }
.admin-products .product-cost-summary .cost-loss { border-left-color: #c13b54; }
.admin-products .product-cost-summary dt { font-size: 10px; letter-spacing: .02em; }
.admin-products .product-cost-summary dd { margin-top: 3px; font-size: 14px; }
.admin-products .product-cost-summary .cost-metric-description { display: none; }
.admin-products .product-badges { align-self: flex-start; }
.admin-products .status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 11px; }
.admin-products .status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.admin-products .product-actions { align-self: flex-start; }
.admin-products .quick-editor { margin-top: 2px; border-top: 1px dashed #e2e8f2; }
.admin-products .quick-editor summary { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 2px; padding: 6px 14px; border: 1px solid #c9daf3; border-radius: 999px; background: #f3f8ff; list-style: none; }
.admin-products .quick-editor summary::-webkit-details-marker { display: none; }
.admin-products .quick-editor[open] summary { background: #185adb; border-color: #185adb; color: #fff; }
.admin-products .quick-editor form { margin-top: 10px; padding: 16px 18px; border: 1px solid #dbe6f5; border-radius: 14px; background: linear-gradient(180deg, #f8fbff, #fff); }
.admin-products .quick-fields legend { margin-bottom: 8px; color: #13284a; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 1100px) { .admin-products .product-cost-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .admin-products .product-cost-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-products > .product-row { padding-left: 20px; } }
/* Modelos de embalagem de envio */
.ship-box-picker { margin: 0 0 14px; padding: 12px 14px; border: 1px dashed #b9cde9; border-radius: 12px; background: #f6f9ff; }
.ship-box-picker label { margin: 0; color: #13284a; font-weight: 700; }
.ship-box-picker label small { color: #8a99ad; font-weight: 500; }
.ship-box-picker select { width: 100%; margin-top: 6px; }
.ship-box-picker .help { margin: 6px 0 0; }
.shipping-box-icon { display: grid; flex: 0 0 52px; width: 52px; height: 52px; place-items: center; border-radius: 14px; background: #f4ede4; font-size: 24px; }
/* Pagina do pedido (admin/order.php): resumo no topo e cartoes premium */
.order-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr); gap: 18px 26px; margin: 0 0 22px; padding: 24px 26px 18px; border: 1px solid #dfe7f2; border-radius: 22px; background: radial-gradient(circle at 100% 0, var(--tint, #edf4ff) 0, transparent 55%), #fff; box-shadow: 0 16px 40px #0b2a4f12; }
.order-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--tone, #185adb), #3fa0ff, #1fa855); }
.order-hero-kicker { margin: 0 0 4px; color: #6a7b94; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.order-hero h2 { margin: 0 0 12px; color: #0f2547; font-size: 26px; letter-spacing: -.01em; }
.order-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.order-hero-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border: 1px solid var(--tone, #185adb); border-radius: 999px; background: var(--tint, #edf4ff); color: var(--tone, #185adb); font-size: 13px; font-weight: 800; }
.order-hero-status span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px #ffffff99; }
.order-hero-tag { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 1px solid #e3e9f2; border-radius: 999px; background: #f8fafc; color: #4a5a72; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.order-hero-whats { border-color: #bfe6cf; background: #effaf4; color: #0f7042; }
.order-hero-whats:hover { background: #dff5e8; }
.order-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; align-self: center; }
.order-hero-stats > div { padding: 12px 14px; border: 1px solid #e6ecf4; border-radius: 14px; background: #fbfcfe; }
.order-hero-stats dt { color: #6a7b94; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.order-hero-stats dd { margin: 4px 0 0; color: #0f2547; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.order-hero-stats dd small { margin-left: 6px; color: #8a5200; font-size: 11px; }
.order-hero-stats .order-hero-sub { margin-top: 2px; color: #6a7b94; font-size: 12px; font-weight: 600; }
.order-hero-stats .is-paid { border-color: #9fd9b8; background: #f1fbf5; }
.order-hero-stats .is-paid dd:not(.order-hero-sub) { color: #0f7042; }
.order-hero-stats .is-open { border-color: #f3d79a; background: #fffaf0; }
.order-hero-stats .is-open dd:not(.order-hero-sub) { color: #8a5200; }
.order-hero-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px dashed #e2e8f2; }
.order-hero-nav a { padding: 7px 14px; border: 1px solid #d6e2f3; border-radius: 999px; background: #fff; color: #124798; font-size: 12.5px; font-weight: 800; text-decoration: none; transition: background .15s, border-color .15s; }
.order-hero-nav a:hover { border-color: #185adb; background: #f3f8ff; }
/* Cartoes da pagina do pedido */
.shipment-panel, .tracking-share, .receipts-panel, #asaas, #order-form, .order-cancellation, .order-delete-panel { border-radius: 20px; border: 1px solid #e2e8f2; box-shadow: 0 10px 28px #0b2a4f0d; scroll-margin-top: 16px; }
.shipment-panel { border-top: 4px solid #0b6e8a; background: linear-gradient(180deg, #f5fbfd, #fff 140px); }
.shipment-panel h2, .tracking-share h2, #asaas h2, .receipts-panel h2 { font-size: 19px; }
.shipment-panel .order-fields { gap: 14px 18px; }
.shipment-panel textarea { padding: 14px 16px; border-radius: 14px; background: #fff; font-size: 14px; line-height: 1.6; }
.shipment-panel form > button { min-width: 180px; }
.shipment-send { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border: 1px solid #bfe6cf; border-radius: 14px; background: #effaf4; }
.shipment-send .button { border-color: #1fa855; background: #1fa855; color: #fff; }
.tracking-share { border-top: 4px solid #185adb; background: linear-gradient(180deg, #f6f9ff, #fff 120px); }
#asaas { border-top: 4px solid #1fa855; }
#order-form { border-top: 4px solid #7c3aed; }
.order-cancellation { border-top: 4px solid #c8102e; background: linear-gradient(180deg, #fff7f8, #fff 120px); }
@media (max-width: 1100px) { .order-hero { grid-template-columns: minmax(0, 1fr); } .order-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .order-hero { padding: 20px 18px 14px; } .order-hero h2 { font-size: 22px; } }
.shipment-locked { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; padding: 18px 20px; border: 1px dashed #b9cde9; border-radius: 16px; background: #f8fbff; }
.shipment-locked-icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #eef3fb; font-size: 22px; }
.shipment-locked p { margin: 0 0 10px; color: #13284a; }
.shipment-checklist { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.shipment-checklist li { padding: 8px 12px; border: 1px solid #e3e9f2; border-radius: 10px; background: #fff; color: #4a5a72; font-size: 13px; font-weight: 700; }
.shipment-checklist li small { color: #8a99ad; font-weight: 600; }
.shipment-checklist li.is-done { border-color: #9fd9b8; background: #effaf4; color: #0f7042; }

/* Perguntas frequentes (admin/faq.php) */
.faq-admin-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-bottom: 24px; background: linear-gradient(135deg, #ffffff 0%, #f1f6ff 100%); }
.faq-admin-hero h2 { margin: 0 0 6px; }
.faq-admin-hero .help { max-width: 640px; margin: 0; }
.faq-admin-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.faq-admin-stats span { padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; color: var(--muted); }
.faq-admin-stats strong { color: var(--ink); }
.faq-admin-stats .is-warn { border-color: #f3d9a4; background: #fff8e8; color: #8a5a00; }
.faq-admin-switch { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.faq-admin-state { font-size: 12px; font-weight: 700; }
.faq-admin-state.is-on { color: #17663a; }
.faq-admin-state.is-off { color: #a3263a; }
.faq-admin-preview { font-size: 13px; font-weight: 600; }
.faq-admin-pages { display: grid; gap: 4px; margin: 4px 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.faq-admin-pages legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.faq-admin-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.faq-admin-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 4px 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; scroll-margin-top: 24px; }
.faq-admin-item:hover { border-color: #c9d8ef; box-shadow: 0 6px 18px #183e6b10; }
.faq-admin-item.is-off { background: #fafbfd; }
.faq-admin-item.is-off h3, .faq-admin-item.is-off p { opacity: .65; }
.faq-admin-item.is-editing { border-color: var(--blue); box-shadow: 0 0 0 3px #185adb1f; }
.faq-admin-item:target { border-color: var(--blue); }
.faq-admin-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #185adb, #0b3f9e); color: #fff; font-size: 13px; font-weight: 800; }
.faq-admin-item.is-off .faq-admin-number { background: #cfd8e6; }
.faq-admin-body { min-width: 0; }
.faq-admin-body h3 { margin: 6px 0 4px; font-size: 15px; line-height: 1.35; }
.faq-admin-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.faq-admin-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.faq-admin-review { border-radius: 6px; padding: 3px 8px; font-size: 10px; font-weight: 700; background: #fff3d6; color: #8a5a00; }
.faq-admin-page { border-radius: 6px; padding: 3px 8px; font-size: 10px; font-weight: 600; background: #eef3fb; color: #3b5a86; }
.faq-admin-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.faq-admin-actions form { margin: 0; }
.faq-admin-actions button, .faq-admin-actions .button { padding: 7px 12px; font-size: 13px; }
.faq-admin-move { display: inline-flex; gap: 4px; }
.faq-admin-move button { width: 34px; padding: 7px 0; }
.faq-admin-actions button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
@media (max-width: 640px) {
  .faq-admin-switch { align-items: stretch; width: 100%; }
  .faq-admin-item { grid-template-columns: minmax(0, 1fr); }
  .faq-admin-number { width: 30px; height: 30px; font-size: 12px; }
  .faq-admin-actions { grid-column: 1; }
}
/* Perguntas frequentes: imagem de fundo e pré-visualização */
.faq-admin-bg { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-bottom: 24px; }
.faq-admin-bg h2 { margin: 0 0 12px; }
.faq-bg-form label { display: block; }
.faq-bg-form input[type="range"] { width: 100%; margin-top: 6px; accent-color: var(--blue); }
.faq-bg-form output { font-weight: 800; color: var(--blue); }
.faq-bg-preview { position: relative; min-height: 230px; border: 1px solid var(--line); border-radius: 16px; background: #eef4fd; overflow: hidden; }
.faq-bg-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.faq-bg-preview img[hidden] { display: none; }
.faq-bg-preview-content { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 26px 30px; }
.faq-bg-preview-content strong { margin-bottom: 4px; color: #082b61; font-size: 18px; }
.faq-bg-preview-content span { width: 100%; max-width: 360px; height: 34px; border: 1px solid #dfe8f4; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px #082b610d; }
@media (max-width: 860px) { .faq-admin-bg { grid-template-columns: minmax(0, 1fr); } }
/* Pagina inicial: secao "Sua ideia, nossa impressao" (admin/home-custom.php) */
.home-custom-admin { display: grid; gap: 24px; max-width: 980px; }
.home-custom-admin .panel { margin: 0; }
.home-custom-admin h2 { margin: 0 0 8px; }
.home-custom-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
.home-custom-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
.home-custom-preview { display: grid; place-items: center; min-height: 200px; border-radius: 16px; background: linear-gradient(135deg, #082b61, #0b4ba6); overflow: hidden; }
.home-custom-preview img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; }
.home-custom-preview img[hidden], .home-custom-preview p[hidden] { display: none; }
.home-custom-preview p { margin: 0; padding: 20px; color: #c7d7ed; font-size: 13px; text-align: center; }
.home-custom-reset { max-width: 980px; margin-top: 18px; }
@media (max-width: 760px) { .home-custom-row, .home-custom-photo { grid-template-columns: minmax(0, 1fr); } }
/* Promocoes (admin/promotions.php) */
.product-chip.chip-promo { border-color: #ffcfb3; background: #fff1e8; color: #b4410b; text-decoration: none; font-weight: 700; }
.product-chip.chip-promo:hover { background: #ffe4d3; }
.promo-rules { margin: 6px 0 14px; padding-left: 18px; }
.promo-rules li { margin-bottom: 4px; }
.promo-admin-list { display: grid; gap: 12px; margin-top: 18px; }
.promo-admin-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.promo-admin-card.is-running { border-color: #ffd2b8; background: linear-gradient(135deg, #fff 60%, #fff6f0); }
.promo-admin-card:not(.is-running) { opacity: .75; }
.promo-admin-card > img, .promo-admin-card > .product-no-image { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.promo-admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.promo-admin-head h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.promo-admin-price { margin: 4px 0 8px; }
.promo-admin-price s { color: var(--muted); font-size: 13px; }
.promo-admin-price strong { color: #b4410b; font-size: 18px; }
.promo-admin-off { padding: 2px 8px; border-radius: 999px; background: #ffe4d3; color: #b4410b; font-size: 12px; font-weight: 800; }
.promo-admin-card progress { width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: #f1f4f9; appearance: none; }
.promo-admin-card progress::-webkit-progress-bar { background: #f1f4f9; border-radius: 999px; }
.promo-admin-card progress::-webkit-progress-value { background: linear-gradient(90deg, #ff8a3d, #e5531a); border-radius: 999px; }
.promo-admin-card progress::-moz-progress-bar { background: linear-gradient(90deg, #ff8a3d, #e5531a); border-radius: 999px; }
.promo-admin-meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.promo-admin-card .actions { margin-top: 10px; }
@media (max-width: 560px) { .promo-admin-card { grid-template-columns: 52px minmax(0, 1fr); } .promo-admin-card > img, .promo-admin-card > .product-no-image { width: 52px; height: 52px; } }
/* Promoções: seletor de produto com busca */
.promo-picker { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.promo-picker legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.promo-picker-search { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 0 12px; border: 1px solid #d5e0ef; border-radius: 10px; background: #fff; }
.promo-picker-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #185adb1f; }
.promo-picker-search[hidden] { display: none; }
.promo-picker-search input { flex: 1; min-width: 0; border: 0; padding: 11px 0; background: transparent; outline: none; box-shadow: none; }
.promo-picker-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; padding: 2px; }
.promo-picker.is-chosen .promo-picker-list, .promo-picker.is-locked .promo-picker-list { max-height: none; overflow: visible; }
.promo-option { display: grid; grid-template-columns: auto 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s; }
.promo-option[hidden] { display: none; }
.promo-option:hover { border-color: #c9d8ef; background: #f8fbff; }
.promo-option:has(input:checked) { border-color: var(--blue); background: #f0f5ff; box-shadow: 0 0 0 2px #185adb24; }
.promo-option:has(input:focus-visible) { outline: 3px solid #c17806; outline-offset: 2px; }
.promo-option input { margin: 0; accent-color: var(--blue); }
.promo-option img, .promo-option-noimg { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.promo-option-noimg { display: grid; place-items: center; background: #eef3fb; }
.promo-option-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.promo-option-text strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.promo-option-text small { color: var(--muted); font-size: 12px; }
.promo-option-text em { color: #a3263a; font-style: normal; }
.promo-option-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.promo-option-price { font-weight: 700; font-size: 13px; white-space: nowrap; }
.promo-option-flag { padding: 1px 7px; border-radius: 999px; background: #fff1e8; color: #b4410b; font-size: 10px; font-weight: 700; white-space: nowrap; }
.promo-picker-empty { margin: 6px 0; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.promo-picker-empty[hidden] { display: none; }
.promo-picker-change { margin-top: 8px; padding: 7px 12px; font-size: 13px; }
.promo-picker-change[hidden] { display: none; }
/* Promoções: vários produtos e tipo de desconto */
.promo-picker-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.promo-picker-bar[hidden] { display: none; }
.promo-picker-bar.has-checked [data-promo-count] { color: var(--blue); font-weight: 700; }
.promo-picker-bar.is-warning [data-promo-count] { color: #a3263a; font-weight: 700; }
.promo-picker-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.promo-picker-tools button { padding: 5px 10px; font-size: 12px; }
.promo-option.is-checked { border-color: var(--blue); background: #f0f5ff; box-shadow: 0 0 0 2px #185adb24; }
.promo-option-new { color: #b4410b; font-size: 12px; font-weight: 800; white-space: nowrap; }
.promo-option-new.is-invalid { color: #a3263a; }
.promo-option-new[hidden], [data-promo-percent-field][hidden], [data-promo-price-field][hidden] { display: none; }
.promo-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.promo-mode legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.promo-mode-option { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.promo-mode-option:has(input:checked) { border-color: var(--blue); background: #f0f5ff; }
.promo-mode-option input { margin-top: 4px; accent-color: var(--blue); }
.promo-mode-option span { display: flex; flex-direction: column; line-height: 1.3; }
.promo-mode-option small { color: var(--muted); font-size: 11px; }
@media (max-width: 560px) { .promo-mode { grid-template-columns: 1fr; } }
/* Promoções: abas "Criar promoção" e "Campanhas" */
.promo-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; width: fit-content; max-width: 100%; }
.promo-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none; transition: background .15s, color .15s; }
.promo-tab:hover { background: #f0f5ff; color: var(--ink); }
.promo-tab.is-active { background: var(--blue); color: #fff; box-shadow: 0 6px 16px #185adb33; }
.promo-tab-count { padding: 1px 8px; border-radius: 999px; background: #eef3fb; color: #3b5a86; font-size: 11px; }
.promo-tab.is-active .promo-tab-count { background: rgba(255, 255, 255, .22); color: #fff; }
.promo-tab-panel > .panel { margin: 0; }
.promo-create { max-width: none; width: 100%; }
.promo-settings { display: grid; gap: 14px; align-content: start; }
/* Telas largas: produtos à esquerda, configurações fixas à direita */
@media (min-width: 1100px) {
    .promo-create-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
    .promo-create-form > .promo-picker { margin: 0; }
    .promo-create-form .promo-picker-list { max-height: min(62vh, 640px); }
    .promo-settings { position: sticky; top: 20px; padding: 18px; border: 1px solid #e3eaf5; border-radius: 16px; background: #f8fbff; }
    .promo-settings .promo-mode { margin: 0; grid-template-columns: 1fr; }
}
.promo-tab-panel .toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.promo-admin-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
/* Bolinhas e caixinhas do seletor: sem a largura total dos campos do painel */
.promo-option input, .promo-mode-option input { display: inline-block; width: 18px; height: 18px; min-width: 18px; margin: 0; padding: 0; flex: none; }
.promo-mode-option { align-items: center; }
.promo-mode-option input { margin: 0; }

/* Construtor reutilizavel de personalizacao do produto. */
.customization-builder { grid-column: 1 / -1; }
.customization-intro { padding: 12px 14px; border: 1px solid #cfe0fa; border-radius: 12px; background: #f5f9ff; color: #274267; }
.customization-rows { display: grid; gap: 14px; margin: 16px 0; }
.customization-row { padding: 16px; border: 1px solid #d6e1f0; border-radius: 14px; background: #fbfdff; }
.customization-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: #0d2d59; }
.customization-row-head .danger { padding: 7px 10px; }
.customization-options { display: grid; margin-top: 12px; }
.customization-required { align-self: end; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: #edf4ff; }
.order-customization-admin { display: grid; gap: 4px; grid-column: 1 / -1; padding: 10px 12px; border-left: 3px solid #2467d6; border-radius: 8px; background: #f2f7ff; color: #244266; }
@media (max-width: 640px) { .customization-row { padding: 12px; } }

/* Pedidos: tempo na etapa ("Pronto há 3 dias · ainda não entregue") */
.order-await { --tone: #3d7a12; --tint: #fff; border-style: dashed; }
.order-stage-time { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: 8px 0 0; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 650; border: 1px solid; }
.order-stage-time.is-ok { background: #eef8e3; border-color: #bfe0a0; color: #2f6410; }
.order-stage-time.is-warn { background: #fff5df; border-color: #f0cf85; color: #8a5a0b; }
.order-stage-time.is-late { background: #fdecee; border-color: #f0b4bd; color: #a3263a; animation: order-late-pulse 2.4s ease-in-out infinite; }
@keyframes order-late-pulse { 50% { box-shadow: 0 0 0 4px #a3263a1f; } }

/* Pedido: escolha da etapa em passos clicáveis */
.order-stage-picker { margin: 18px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcff; }
.order-stage-picker legend { padding: 0 6px; font-weight: 700; font-size: 15px; }
.order-stage-picker > .order-stage-time { margin: 0 0 14px; }
.order-stage-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; counter-reset: stage; }
.order-stage-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; margin: 0; padding: 12px 8px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: #52657f; text-align: center; font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.order-stage-step:hover { border-color: var(--tone); color: var(--tone); transform: translateY(-1px); }
.order-stage-step input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.order-stage-step-icon { font-size: 24px; line-height: 1; filter: grayscale(.6); }
.order-stage-step-text small { color: inherit; opacity: .7; }
.order-stage-step:has(input:checked) { border-color: var(--tone); background: var(--tint); color: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 18%, transparent); }
.order-stage-step:has(input:checked) .order-stage-step-icon { filter: none; }
.order-stage-step:has(input:checked)::after { content: "✓"; position: absolute; top: 6px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--tone); color: #fff; font-size: 12px; }
.order-stage-step:has(input:focus-visible) { outline: 3px solid var(--tone); outline-offset: 2px; }
.order-stage-step-now { position: absolute; top: 6px; left: 8px; padding: 1px 6px; border-radius: 999px; background: #eef3fb; color: #3b5a86; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.order-stage-cancel { flex-direction: row; min-height: 0; width: fit-content; margin-top: 10px; padding: 8px 14px 8px 12px; font-size: 13px; }
.order-stage-cancel .order-stage-step-icon { font-size: 14px; }
.order-stage-cancel:has(input:checked)::after { position: static; margin-left: 4px; }
.order-stage-cancel .order-stage-step-now { position: static; }
.order-cancel-reason { margin-top: 12px; }
/* Motivo só aparece quando "Cancelar pedido" está marcado */
@supports selector(:has(*)) {
    .order-cancel-reason { display: none; }
    .order-stage-picker:has(.order-stage-cancel input:checked) .order-cancel-reason { display: block; }
}
@media (max-width: 560px) { .order-stage-steps { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .order-stage-time.is-late { animation: none; } .order-stage-step { transition: none; } }
/* Etapa do pedido: salvar ao clicar */
.order-stage-hint { margin: -4px 0 10px; color: var(--muted); font-size: 12px; }
.order-stage-saving { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #edf4ff; color: #185adb; font-size: 13px; font-weight: 650; width: fit-content; }
.order-stage-picker > .order-stage-saving.is-done { margin: 0 0 12px; background: #e9f8ef; color: #11754f; }
.order-stage-saving.is-warn { background: #fdecee; color: #a3263a; }
.order-stage-saving.is-error { background: #fff5df; color: #8a5a0b; }
.order-stage-picker.is-saving .order-stage-step { pointer-events: none; opacity: .65; }
.order-stage-picker.is-saving .order-stage-step:has(input:checked) { opacity: 1; }
[data-stage-cancel-confirm] { margin-top: 8px; }
.order-cancel-reason { padding: 14px; border: 1px solid #f0b4bd; border-radius: 12px; background: #fff7f8; }
.order-cancel-info { margin: 0 0 10px; color: #7a1f2d; font-size: 13px; }
.order-cancel-blocked { margin-top: 10px; color: #a3263a; font-weight: 650; }
/* Link de acompanhamento: envio direto pela API do WhatsApp */
.tracking-whatsapp { display: inline-flex; margin: 0; }
.tracking-whatsapp .whatsapp-send { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.tracking-whatsapp .whatsapp-send:hover { background: #17824a; border-color: #17824a; }
.tracking-whatsapp .whatsapp-send:disabled { opacity: .7; cursor: progress; }
.tracking-whatsapp-info { margin-top: 8px; }
