:root {
    --green: #18765e;
    --green-2: #e4f3ed;
    --green-3: #f4faf7;
    --mint: #6fd0aa;
    --red: #df4b35;
    --blue: #2f7fd8;
    --ink: #17212b;
    --muted: #6b7780;
    --line: #e5ece8;
    --line-strong: #d5e2dc;
    --bg: #f3f6f5;
    --nav: #082238;
    --nav-2: #0d314f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 256px 1fr;
}

.side {
    background:
        radial-gradient(circle at 30px 26px, rgba(111, 208, 170, .22), transparent 30px),
        linear-gradient(180deg, var(--nav), var(--nav-2));
    color: #dfeaf2;
    padding: 22px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 20px;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-mark {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #5fc59f, #ffffff);
    box-shadow: 0 10px 26px rgba(111, 208, 170, .25);
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    border-radius: 4px;
    background: rgba(8, 34, 56, .62);
}

.brand-mark::before {
    width: 16px;
    height: 5px;
    left: 9px;
    top: 14px;
}

.brand-mark::after {
    width: 5px;
    height: 16px;
    left: 14px;
    top: 9px;
}

.menu-group {
    margin: 14px 0 22px;
}

.menu-title {
    padding: 0 10px 8px;
    color: #8ba8bd;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

.menu-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    min-height: 43px;
    margin: 5px 0;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #d7e5ee;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 700;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.menu-btn.active,
.menu-btn:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .08);
    color: #fff;
}

.menu-btn.active {
    box-shadow: inset 3px 0 0 var(--mint);
}

.menu-btn:hover {
    transform: translateX(1px);
}

.menu-text {
    flex: 1;
    min-width: 0;
}

.menu-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: #4cc091;
    opacity: .9;
}

.ui-icon,
.menu-icon,
.tab-icon,
.entity-icon,
.section-icon,
.stat-svg,
.field-icon,
.detail-placeholder-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    color: #99d9c4;
}

.main {
    min-width: 0;
}

.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.topbar h1 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.topbar-icon {
    width: 22px;
    height: 22px;
    color: var(--green);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #fff;
}

.topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hidden {
    display: none !important;
}

.workspace {
    padding: 26px 30px 48px;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow: auto;
    padding-bottom: 12px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    border-radius: 8px;
    min-height: 40px;
    padding: 0 13px;
    cursor: pointer;
    font-weight: 700;
}

.tab-icon {
    width: 16px;
    height: 16px;
}

.tab.active {
    color: var(--green);
    border-color: rgba(31, 122, 99, .3);
    background: var(--green-2);
}

.entity-head {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border: 1px solid #dcebe5;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.96), rgba(241,249,246,.96)),
        radial-gradient(circle at 88% 8%, rgba(111, 208, 170, .18), transparent 260px);
    box-shadow: 0 18px 44px rgba(12, 35, 26, .07);
}

.entity-head > div:not(.entity-visual):not(.entity-count) {
    flex: 1;
    min-width: 0;
}

.entity-visual {
    width: 60px;
    height: 60px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--green);
    background: linear-gradient(135deg, #daf4e9, #ffffff);
    border: 1px solid rgba(24, 118, 94, .15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88), 0 10px 24px rgba(24, 118, 94, .1);
}

.entity-icon {
    width: 28px;
    height: 28px;
}

.entity-head h2 {
    margin: 6px 0 8px;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 850;
    letter-spacing: 0;
}

.entity-head p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.entity-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-2);
    font-size: 12px;
    font-weight: 800;
}

.entity-count {
    min-width: 124px;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f8fbfa);
    border: 1px solid #dfeae5;
    color: var(--muted);
    text-align: center;
    box-shadow: 0 10px 24px rgba(12, 35, 26, .05);
}

.entity-count strong {
    display: block;
    color: var(--ink);
    font-size: 28px;
}

.entity-count span {
    font-size: 13px;
}

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

.stat-card,
.panel,
.table-card {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(12, 35, 26, .06);
}

.table-card {
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(12, 35, 26, .08);
}

.stat-card {
    position: relative;
    min-height: 138px;
    padding: 18px 20px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
    border-radius: 12px;
    color: var(--green);
    background: var(--green-2);
}

.stat-svg {
    width: 22px;
    height: 22px;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 38px rgba(12, 35, 26, .09);
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 7px;
    font-size: 31px;
    line-height: 1.08;
}

.stat-card small {
    display: inline-flex;
    margin-top: 10px;
    color: var(--green);
}

.panel {
    padding: 20px;
}

.panel p {
    color: var(--muted);
    line-height: 1.75;
}

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

.panel h2,
.table-card h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 800;
}

.section-icon {
    width: 18px;
    height: 18px;
    color: var(--green);
}

.list-panel-head {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, .95fr);
    gap: 18px;
    align-items: stretch;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, #ffffff, #f8fcfa),
        radial-gradient(circle at 100% 0, rgba(47, 127, 216, .08), transparent 260px);
}

.list-panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.list-panel-title h2 {
    margin: 0 0 5px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 850;
}

.list-panel-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.list-panel-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--green);
    background: linear-gradient(135deg, #e2f5ee, #fff);
    border: 1px solid rgba(24, 118, 94, .14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 8px 20px rgba(24, 118, 94, .08);
}

.list-panel-icon .ui-icon {
    width: 22px;
    height: 22px;
}

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

.list-summary-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #dfeae5;
    border-radius: 12px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 20px rgba(12, 35, 26, .04);
}

.list-summary-card > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--green);
    background: var(--green-2);
}

.list-summary-card .ui-icon {
    width: 17px;
    height: 17px;
}

.list-summary-card em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.list-summary-card strong {
    display: block;
    margin-top: 2px;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.15;
}

.list-summary-card small {
    display: block;
    margin-top: 3px;
    color: #8c9b94;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.list-toolbar {
    background: linear-gradient(180deg, #fff, #fbfdfc);
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 11px 18px;
    border-bottom: 1px solid var(--line);
    background: #f8fbfa;
    color: var(--muted);
    font-size: 13px;
}

.table-status span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid #dce8e2;
    border-radius: 999px;
    background: #fff;
}

.table-status strong {
    margin: 0 4px;
    color: var(--green);
}

.input,
.select,
.textarea {
    border: 1px solid #d4e3dc;
    border-radius: 10px;
    min-height: 42px;
    padding: 0 13px;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
    color: var(--ink);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 0 rgba(12, 35, 26, .02);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.select {
    appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, #6f847c 50%),
        linear-gradient(135deg, #6f847c 50%, transparent 50%),
        linear-gradient(180deg, #ffffff, #fbfdfc);
    background-position:
        calc(100% - 19px) 18px,
        calc(100% - 13px) 18px,
        0 0;
    background-size: 6px 6px, 6px 6px, 100% 100%;
    background-repeat: no-repeat;
}

.input::placeholder,
.textarea::placeholder {
    color: #98aaa3;
}

.search-field {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-field .input {
    width: 206px;
    padding-left: 38px;
}

.field-icon {
    position: absolute;
    left: 13px;
    width: 16px;
    height: 16px;
    color: #8ba09a;
    pointer-events: none;
    z-index: 1;
}

.verify-input {
    width: 206px;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(31, 122, 99, .55);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(31, 122, 99, .1), inset 0 1px 0 rgba(255,255,255,.9);
}

.textarea {
    min-height: 90px;
    padding: 10px 12px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    border: 1px solid rgba(24, 118, 94, .18);
    border-radius: 10px;
    padding: 0 17px;
    background: linear-gradient(135deg, #1a8268, #0f6f58);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(24, 118, 94, .16), inset 0 1px 0 rgba(255,255,255,.18);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.btn .ui-icon,
.link-btn .ui-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(31, 122, 99, .22), inset 0 1px 0 rgba(255,255,255,.22);
}

.btn.secondary {
    background: linear-gradient(180deg, #fff, #f7fbf9);
    color: var(--green);
    border: 1px solid rgba(31, 122, 99, .22);
    box-shadow: 0 8px 18px rgba(12, 35, 26, .04), inset 0 1px 0 rgba(255,255,255,.85);
}

.btn.warn {
    background: linear-gradient(135deg, #e85f49, #ca3e2d);
    border-color: rgba(223, 75, 53, .2);
    box-shadow: 0 10px 20px rgba(223, 75, 53, .16), inset 0 1px 0 rgba(255,255,255,.18);
}

.table-wrap {
    position: relative;
    overflow: auto;
    scrollbar-gutter: stable;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.table-wrap table {
    border-collapse: separate;
    border-spacing: 0 10px;
    padding: 0 10px 12px;
}

.panel table {
    min-width: 560px;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 14px;
}

th {
    color: #7c8990;
    background: #fbfcfc;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table-wrap th {
    height: 44px;
    padding-top: 8px;
    padding-bottom: 6px;
    border-bottom: 0;
    color: #768982;
    background: #fff;
    font-size: 13px;
}

.table-wrap td {
    height: 72px;
    border-top: 1px solid #e7f0ec;
    border-bottom: 1px solid #e7f0ec;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.table-wrap tbody td:first-child {
    border-left: 1px solid #e7f0ec;
    border-radius: 12px 0 0 12px;
}

.table-wrap tbody td:last-child {
    border-right: 1px solid #e7f0ec;
    border-radius: 0 12px 12px 0;
}

tbody tr {
    transition: background .12s ease, box-shadow .12s ease;
}

tbody tr:hover {
    background: #fbfdfc;
}

.table-wrap tbody tr:hover td {
    border-color: #d4e9df;
    background: #fbfefd;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 8px 20px rgba(12, 35, 26, .04);
}

.table-actions-col {
    position: sticky;
    right: 0;
    width: 164px;
    min-width: 164px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .9), #fff 24px);
    box-shadow: -12px 0 24px rgba(12, 35, 26, .05);
}

.catalog-action-col {
    width: 206px;
    min-width: 206px;
}

th.table-actions-col {
    z-index: 3;
    color: #435951;
    text-align: center;
    background: linear-gradient(90deg, rgba(251, 252, 252, .9), #fbfcfc 24px);
}

td.table-actions-col {
    z-index: 2;
    background: linear-gradient(90deg, rgba(255, 255, 255, .92), #fff 26px);
    border-right: 1px solid #e7f0ec;
}

.table-wrap tbody tr:hover td.table-actions-col {
    background: linear-gradient(90deg, rgba(251, 254, 253, .92), #fbfefd 26px);
}

.thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #edf3ef;
    border: 1px solid #dde8e3;
    box-shadow: 0 6px 14px rgba(12, 35, 26, .08);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--green);
    background: linear-gradient(180deg, #e4f3ed, #d8efe6);
    border: 1px solid rgba(24, 118, 94, .08);
    font-size: 12px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.badge.red {
    color: var(--red);
    background: linear-gradient(180deg, #fff1ef, #fde5e1);
    border-color: rgba(223, 75, 53, .12);
}

.badge.muted {
    color: #4f6260;
    background: linear-gradient(180deg, #f4f8f6, #edf3f1);
    border-color: #dfe8e4;
}

.table-main-cell {
    min-width: 210px;
    color: #102338;
    font-weight: 850;
}

.table-money-cell strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #071a2a;
    background: #f7faf9;
    border: 1px solid #e1ebe6;
    font-weight: 900;
}

.table-media-cell {
    width: 94px;
}

.table-badge-cell {
    min-width: 108px;
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.catalog-action-col .actions {
    display: grid;
    grid-template-columns: repeat(2, 76px);
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    border: 1px solid rgba(47, 127, 216, .22);
    border-radius: 10px;
    padding: 0 11px;
    background: linear-gradient(180deg, #fff, #f7fbff);
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.link-btn:hover {
    background: #eef6ff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(47, 127, 216, .12);
}

.actions .link-btn {
    min-height: 36px;
    min-width: 74px;
    padding: 0 13px;
    border-radius: 12px;
}

.catalog-action-col .actions .link-btn {
    width: 76px;
    min-width: 76px;
    min-height: 34px;
    padding: 0;
}

.actions [data-view-index] {
    color: #246fc7;
    border-color: #cfe2ff;
    background: linear-gradient(180deg, #f7fbff, #eef6ff);
}

.actions [data-view-index]:hover {
    border-color: #a9cdf9;
    background: #edf5ff;
    box-shadow: 0 10px 20px rgba(47, 127, 216, .14);
}

.actions [data-edit-index] {
    color: var(--green);
    border-color: #c8e4d8;
    background: linear-gradient(180deg, #f5fcf8, #eaf7f0);
}

.actions [data-edit-index]:hover {
    background: var(--green-2);
    box-shadow: 0 8px 18px rgba(24, 118, 94, .12);
}

.actions .action-toggle,
.actions .action-delete {
    min-width: 72px;
}

.actions .action-on {
    color: var(--green);
    border-color: #bfe2d3;
    background: linear-gradient(180deg, #f4fcf8, #e6f5ee);
}

.actions .action-on:hover {
    border-color: #9cd4bd;
    background: #e5f5ee;
    box-shadow: 0 10px 20px rgba(24, 118, 94, .13);
}

.actions .action-off {
    color: #9a6a0c;
    border-color: #f0d99f;
    background: linear-gradient(180deg, #fffaf0, #fdf2cf);
}

.actions .action-off:hover {
    border-color: #e5c773;
    background: #fff4cf;
    box-shadow: 0 10px 20px rgba(154, 106, 12, .12);
}

.actions .action-delete {
    color: var(--red);
    border-color: #f5c9c1;
    background: linear-gradient(180deg, #fff7f5, #fdecea);
}

.actions .action-delete:hover {
    border-color: #eba99c;
    background: #fde9e5;
    box-shadow: 0 10px 20px rgba(223, 75, 53, .13);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 12px;
    background: rgba(8, 20, 30, .48);
    backdrop-filter: blur(4px);
    z-index: 20;
}

.modal.show {
    display: grid;
}

.modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .25);
}

.modal-card.wide {
    width: min(1040px, 100%);
}

.modal-card.product-editor {
    width: min(1180px, 100%);
}

.modal-card.settings-editor {
    width: min(760px, 100%);
}

.modal-head,
.modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    flex: 0 0 auto;
}

.modal-head {
    z-index: 2;
    min-height: 72px;
    background: linear-gradient(180deg, #ffffff, #fbfdfc);
}

.modal-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
}

.modal-foot {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    box-shadow: 0 -10px 24px rgba(12, 35, 26, .05);
}

.modal-foot.hidden {
    display: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: min-content;
    align-items: start;
    align-content: start;
    gap: 16px;
    padding: 22px;
}

#modalForm {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#modalFields {
    min-height: 0;
    flex: 0 1 auto;
    max-height: calc(100vh - 178px);
    max-height: calc(100dvh - 178px);
    overflow: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

#modalFields::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#modalFields::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(49, 80, 69, .28);
    background-clip: content-box;
}

.product-edit-form {
    gap: 18px;
    padding: 24px;
    background: linear-gradient(180deg, #f5faf8, #fff 280px);
}

.product-edit-hero {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid #dcebe5;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.95), rgba(235,248,242,.96)),
        linear-gradient(90deg, rgba(24,118,94,.08), transparent);
    box-shadow: 0 12px 32px rgba(12, 35, 26, .06);
}

.product-edit-hero img {
    width: 160px;
    height: 118px;
    border-radius: 8px;
    object-fit: cover;
    background: #edf3ef;
    border: 1px solid var(--line);
}

.product-edit-hero h3 {
    margin: 10px 0 6px;
    font-size: 25px;
    line-height: 1.25;
    letter-spacing: 0;
}

.product-edit-hero p {
    margin: 0;
    color: var(--muted);
}

.product-edit-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.product-edit-metrics span {
    display: grid;
    gap: 4px;
    min-height: 64px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}

.product-edit-metrics strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.1;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

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

.field > span,
.field label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
}

.form-grid:not(.product-edit-form) .field {
    padding: 14px;
    border: 1px solid #e0ebe6;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(12, 35, 26, .03);
}

.form-grid:not(.product-edit-form) .field:focus-within {
    border-color: rgba(31, 122, 99, .32);
    box-shadow: 0 10px 24px rgba(12, 35, 26, .055), 0 0 0 4px rgba(31, 122, 99, .06);
}

.form-grid:not(.product-edit-form) .textarea {
    min-height: 118px;
}

.settings-edit-form {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px;
}

.settings-edit-form .setting-field {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.settings-edit-form .setting-field:focus-within {
    border-color: transparent;
    box-shadow: none;
}

.settings-edit-form .input,
.settings-edit-form .select {
    min-height: 46px;
}

.settings-edit-form .field-hint {
    display: block;
    margin-top: 2px;
    line-height: 1.55;
}

.product-edit-form .field {
    gap: 9px;
    padding: 16px;
    border: 1px solid #e1ede8;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(12, 35, 26, .035);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.product-edit-form .field:focus-within {
    border-color: rgba(31, 122, 99, .32);
    box-shadow: 0 12px 28px rgba(12, 35, 26, .07), 0 0 0 4px rgba(31, 122, 99, .07);
}

.product-edit-form .field > span {
    color: #315045;
    font-size: 13px;
    letter-spacing: 0;
}

.product-edit-form .input,
.product-edit-form .select,
.product-edit-form .textarea {
    min-height: 42px;
    border-radius: 10px;
    font-size: 14px;
}

.image-url-preview {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.image-url-preview img {
    width: 92px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #edf3ef;
    border: 1px solid var(--line);
}

.rich-editor-field {
    display: grid;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
}

.product-edit-form .rich-editor-field {
    padding: 0;
    border: 0;
    background: transparent;
}

.rich-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.rich-editor-head span {
    color: #315045;
    font-size: 14px;
    font-weight: 850;
}

.rich-editor-head small {
    color: var(--muted);
    font-size: 12px;
}

.rich-editor-input {
    display: none;
}

.rich-editor {
    overflow: hidden;
    border: 1px solid #d7e6df;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(12, 35, 26, .045);
}

.rich-toolbar {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f7fbf9);
}

.rich-toolbar button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #d9e9e2;
    border-radius: 8px;
    color: var(--green);
    background: #fff;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.rich-toolbar button:hover {
    border-color: rgba(24, 118, 94, .32);
    background: var(--green-2);
    transform: translateY(-1px);
}

.rich-toolbar .ui-icon {
    width: 18px;
    height: 18px;
}

.rich-editor-canvas {
    min-height: 300px;
    padding: 20px 22px;
    outline: none;
    line-height: 1.8;
    color: var(--ink);
    font-size: 15px;
}

.rich-editor-canvas:focus {
    box-shadow: inset 0 0 0 2px rgba(24, 118, 94, .12);
}

.rich-editor-canvas h2,
.rich-editor-canvas h3,
.rich-editor-canvas h4 {
    margin: 14px 0 8px;
    line-height: 1.35;
}

.rich-editor-canvas p {
    margin: 8px 0;
}

.rich-editor-canvas blockquote {
    margin: 12px 0;
    padding: 10px 14px;
    border-left: 4px solid var(--green);
    border-radius: 6px;
    background: #f4faf7;
    color: #38584d;
}

.rich-editor-canvas img {
    max-width: 100%;
    border-radius: 8px;
}

.detail-content {
    display: grid;
    gap: 20px;
    padding: 22px;
    background: linear-gradient(180deg, #f8fbfa, #fff 220px);
}

.detail-hero {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 22px;
    border: 1px solid #dcebe5;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(238,248,243,.96)),
        linear-gradient(90deg, rgba(24,118,94,.08), transparent);
    box-shadow: 0 12px 32px rgba(12, 35, 26, .06);
}

.detail-hero.no-cover {
    grid-template-columns: 88px 1fr auto;
}

.detail-placeholder {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--green);
    background: linear-gradient(135deg, #e7f6f0, #fff);
    border: 1px solid rgba(24, 118, 94, .16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.detail-placeholder-icon {
    width: 34px;
    height: 34px;
}

.detail-cover {
    width: 160px;
    height: 130px;
    border-radius: 8px;
    object-fit: cover;
    background: #edf3ef;
}

.detail-main {
    min-width: 0;
}

.detail-overline {
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-main h3 {
    margin: 8px 0;
    font-size: 26px;
    line-height: 1.35;
    letter-spacing: 0;
}

.detail-main p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.detail-tags span {
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--green);
    background: #fff;
    border: 1px solid rgba(31, 122, 99, .18);
    font-size: 12px;
    font-weight: 700;
}

.detail-state {
    align-self: start;
}

.detail-hero-aside {
    display: grid;
    justify-items: end;
    align-content: center;
    gap: 10px;
    min-width: 120px;
    color: var(--muted);
    font-size: 13px;
}

.detail-status {
    display: flex;
    justify-content: flex-end;
}

.detail-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.detail-meta-chips span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #224236;
    background: #fff;
    border: 1px solid rgba(24, 118, 94, .15);
    font-size: 12px;
    font-weight: 800;
}

.detail-meta-chips em {
    color: var(--green);
    font-style: normal;
}

.detail-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

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

.kpi span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
}

.kpi strong {
    font-size: 24px;
}

.detail-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(12, 35, 26, .04);
}

.detail-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    font-size: 18px;
    letter-spacing: 0;
}

.detail-section h4::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 99px;
    background: var(--green);
}

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

.detail-item {
    min-height: 78px;
    padding: 15px;
    border-radius: 8px;
    background: #f8fbfa;
    border: 1px solid #edf3f0;
}

.detail-item.wide {
    grid-column: 1 / -1;
    min-height: auto;
    background: #fbfcfc;
    border-color: var(--line);
}

.detail-label {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.detail-value {
    line-height: 1.55;
    word-break: break-word;
}

.assoc-value {
    display: grid;
    gap: 4px;
}

.assoc-value strong {
    color: var(--ink);
    font-weight: 850;
}

.assoc-value small {
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--muted);
    background: #eef4f1;
    font-size: 12px;
    font-weight: 700;
}

.assoc-value.unresolved strong {
    color: #b54028;
}

.preline {
    white-space: pre-line;
}

.detail-inline-img {
    width: 78px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
}

.detail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-gallery img {
    width: 96px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    background: #edf3ef;
}

.rich-preview {
    max-height: 180px;
    overflow: auto;
    padding: 16px;
    border-radius: 8px;
    color: #47534e;
    background: #f8faf9;
    line-height: 1.75;
    white-space: pre-wrap;
}

.table-card > .toolbar h2 {
    margin: 0;
}

.muted-text {
    color: #9aa6a0;
}

.empty {
    padding: 42px;
    color: var(--muted);
    text-align: center;
}

.vue-fallback,
.page-loading,
.inline-error {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 220px;
    padding: 36px;
    color: var(--muted);
    text-align: center;
}

.vue-fallback strong,
.page-loading strong,
.inline-error strong {
    color: var(--ink);
    font-size: 18px;
}

.inline-error {
    min-height: auto;
    border: 1px solid #f0c9c2;
    border-radius: 12px;
    color: #c54534;
    background: #fff5f2;
}

.modal-error {
    margin: 0 22px 16px;
    padding: 12px 14px;
    border: 1px solid #f0c9c2;
    border-radius: 10px;
    color: #c54534;
    background: #fff5f2;
}

.btn:disabled,
.link-btn:disabled {
    cursor: not-allowed;
    opacity: .62;
    transform: none;
}

.field-error {
    color: #c54534;
    font-size: 12px;
}

.store-shell {
    grid-template-columns: 238px 1fr;
}

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

.store-shell.locked .side,
.store-shell.locked .topbar {
    display: none;
}

.store-shell.locked .workspace {
    min-height: 100vh;
    padding: 0;
}

.store-login-screen {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-content: center;
    gap: 48px;
    padding: 48px min(6vw, 72px);
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(8, 34, 56, .94), rgba(18, 118, 94, .9)),
        url("/assets/img/store-1.png") center/cover;
    color: #fff;
}

.admin-login-screen {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-content: center;
    gap: 46px;
    padding: 52px min(6vw, 76px);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(8, 34, 56, .96), rgba(24, 118, 94, .88)),
        url("/assets/img/banner-1.png") center/cover;
}

.admin-login-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 34, 56, .96) 0%, rgba(8, 34, 56, .86) 48%, rgba(8, 34, 56, .45) 100%);
    pointer-events: none;
}

.admin-login-brand,
.admin-login-hero {
    position: relative;
    z-index: 1;
}

.admin-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 850;
}

.admin-login-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
    gap: min(8vw, 92px);
    align-items: center;
}

.admin-login-copy {
    max-width: 760px;
}

.admin-login-copy .entity-kicker {
    color: #d9fff0;
    background: rgba(255, 255, 255, .13);
}

.admin-login-copy h1 {
    margin: 18px 0;
    font-size: 66px;
    line-height: 1.06;
    letter-spacing: 0;
}

.admin-login-copy p {
    max-width: 580px;
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-size: 20px;
    line-height: 1.75;
}

.admin-login-modules {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    max-width: 760px;
    margin-top: 34px;
}

.admin-login-modules span {
    min-height: 88px;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .11);
    color: #f4fffb;
    font-weight: 800;
    text-align: center;
}

.admin-login-modules .ui-icon {
    width: 22px;
    height: 22px;
}

.admin-login-card {
    width: min(460px, 100%);
}

.store-login-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 34, 56, .96) 0%, rgba(8, 34, 56, .82) 43%, rgba(8, 34, 56, .42) 100%);
    pointer-events: none;
}

.store-login-brand,
.store-login-hero {
    position: relative;
    z-index: 1;
}

.store-login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 850;
}

.store-login-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
    gap: min(8vw, 88px);
    align-items: center;
}

.store-login-copy {
    max-width: 690px;
}

.store-login-copy .entity-kicker {
    color: #d9fff0;
    background: rgba(255, 255, 255, .13);
}

.store-login-copy h1 {
    margin: 18px 0 18px;
    font-size: 68px;
    line-height: 1.05;
    letter-spacing: 0;
}

.store-login-copy p {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 20px;
    line-height: 1.75;
}

.store-login-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 780px;
    margin-top: 34px;
}

.login-flow-card {
    min-height: 132px;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .11);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.login-flow-card span {
    width: fit-content;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    color: #0b2c40;
    background: #d9fff0;
    font-size: 12px;
    font-weight: 850;
}

.login-flow-card strong {
    color: #fff;
    font-size: 19px;
    line-height: 1.25;
}

.login-flow-card em {
    color: rgba(255, 255, 255, .78);
    font-style: normal;
    line-height: 1.55;
}

.login-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.login-highlights span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    color: #f4fffb;
    font-weight: 750;
}

.login-highlights .ui-icon {
    width: 17px;
    height: 17px;
}

.login-panel {
    min-height: calc(100vh - 150px);
    display: grid;
    place-items: center;
}

.login-card {
    width: min(420px, 100%);
    display: grid;
    gap: 18px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 32px 82px rgba(0, 0, 0, .3);
}

.login-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.login-card h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
}

.login-card p {
    margin: 6px 0 0;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 14px;
}

.store-welcome {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 8px;
    border: 1px solid rgba(24, 118, 94, .18);
    background:
        linear-gradient(135deg, #ffffff 0%, #eff8f4 55%, #e3f1fa 100%);
    box-shadow: 0 14px 36px rgba(12, 35, 26, .07);
}

.store-welcome h2 {
    margin: 12px 0 8px;
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: 0;
}

.store-welcome p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.store-welcome-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.store-welcome-meta > div {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(24, 118, 94, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .74);
}

.store-welcome-meta > div.wide {
    grid-column: 1 / -1;
}

.store-welcome-meta span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.store-welcome-meta strong {
    display: block;
    color: var(--ink);
    line-height: 1.45;
}

.verify-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.verify-scanner {
    display: grid;
    gap: 12px;
}

.verify-scanner .scan-input {
    min-height: 48px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.verify-scanner .btn {
    min-height: 48px;
    white-space: nowrap;
}

.scanner-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dceae4;
    border-radius: 12px;
    color: var(--muted);
    background: #f7fbf8;
    font-size: 13px;
}

.scanner-hint strong {
    color: #18765e;
}

.verify-tip,
.verify-result {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
}

.verify-tip {
    color: var(--muted);
    background: #f6f8f6;
}

.verify-result {
    display: grid;
    gap: 2px;
    border: 1px solid #dceae4;
    background: #f7fbf8;
}

.verify-result strong {
    font-size: 16px;
}

.verify-result.success {
    color: #18765e;
    border-color: #b9ded0;
    background: #effaf5;
}

.verify-result.error {
    color: #c54534;
    border-color: #f0c9c2;
    background: #fff5f2;
}

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: stretch;
    min-height: 230px;
    margin-bottom: 16px;
    padding: 28px;
    border-radius: 8px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(8, 34, 56, .96), rgba(13, 83, 85, .94) 58%, rgba(24, 118, 94, .98)),
        repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 80px);
    box-shadow: 0 18px 45px rgba(8, 34, 56, .18);
    overflow: hidden;
}

.dashboard-hero-copy {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
}

.dashboard-hero .entity-kicker {
    width: fit-content;
    color: #d8fff0;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
}

.dashboard-hero h2 {
    margin: 14px 0 10px;
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: 0;
}

.dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.8;
}

.dashboard-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin-top: 26px;
}

.dashboard-hero-metrics span {
    display: grid;
    gap: 4px;
    min-height: 76px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .09);
}

.dashboard-hero-metrics strong {
    color: #fff;
    font-size: 24px;
    line-height: 1.1;
}

.dashboard-hero-card {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: space-between;
    min-height: 100%;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, .11);
    backdrop-filter: blur(12px);
}

.dashboard-orbit {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #e7fff5;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
}

.dashboard-orbit-icon {
    width: 34px;
    height: 34px;
}

.dashboard-hero-card span,
.dashboard-hero-card small {
    color: rgba(255, 255, 255, .72);
}

.dashboard-hero-card strong {
    display: block;
    margin: 8px 0 2px;
    font-size: 48px;
    line-height: 1;
}

.dashboard-hero-card .btn {
    justify-self: start;
    color: #dffff3;
    border-color: rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .12);
}

.dashboard-stats {
    margin-bottom: 16px;
}

.dashboard-stat {
    text-align: left;
    cursor: pointer;
}

.dashboard-stat:nth-child(2) .stat-icon {
    color: var(--blue);
    background: #e9f2ff;
}

.dashboard-stat:nth-child(3) .stat-icon {
    color: #946200;
    background: #fff5dd;
}

.dashboard-stat:nth-child(4) .stat-icon {
    color: #7b4cc2;
    background: #f0eafb;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(12, 35, 26, .06);
}

.dashboard-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.dashboard-panel-head h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
}

.dashboard-panel-head > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.flow-list {
    display: grid;
    gap: 14px;
}

.flow-row {
    display: grid;
    grid-template-columns: minmax(100px, 150px) minmax(0, 1fr) 46px;
    gap: 12px;
    align-items: center;
}

.flow-row div:first-child {
    display: grid;
    gap: 2px;
}

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

.flow-row span,
.flow-row em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.flow-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf3f1;
}

.flow-track i {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), var(--mint));
}

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

.sync-item {
    display: grid;
    gap: 8px;
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfa;
}

.sync-item span {
    color: var(--muted);
    font-size: 13px;
}

.sync-item strong {
    font-size: 28px;
    line-height: 1;
}

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

.dashboard-action {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(12, 35, 26, .045);
}

.dashboard-action:hover {
    border-color: rgba(24, 118, 94, .28);
    transform: translateY(-1px);
}

.dashboard-action-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: var(--green);
}

.dashboard-action span {
    display: grid;
    gap: 4px;
}

.dashboard-action strong {
    font-size: 15px;
}

.dashboard-action small {
    color: var(--muted);
}

.dashboard-table-grid {
    align-items: start;
}

.store-rank {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

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

.rank-row b {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: var(--green);
    background: var(--green-2);
}

.rank-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row strong {
    color: var(--ink);
}

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

.setting-value-warn {
    display: inline-grid;
    gap: 4px;
    max-width: 560px;
}

.setting-value-warn span {
    color: var(--ink);
}

.setting-value-warn small {
    width: fit-content;
    padding: 2px 7px;
    border-radius: 999px;
    color: #b54028;
    background: #fff1ed;
    font-size: 12px;
    font-weight: 800;
}

.permission-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 720px;
}

.permission-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbfa;
}

.permission-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid #d8e8e2;
    border-radius: 10px;
    background: #fff;
}

.permission-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
}

.permission-option span {
    display: grid;
    gap: 2px;
}

.permission-option strong {
    font-size: 13px;
    color: var(--ink);
}

.permission-option small,
.field-hint {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 980px) {
    .app-shell,
    .store-shell {
        grid-template-columns: 1fr;
    }

    .side {
        position: relative;
        height: auto;
    }

    .stats-grid,
    .panel-grid,
    .detail-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .list-panel-head {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .dashboard-grid,
    .product-edit-hero {
        grid-template-columns: 1fr;
    }

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

    .product-edit-hero img {
        width: 100%;
        height: 180px;
    }

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

    .store-login-hero,
    .admin-login-hero,
    .store-welcome {
        grid-template-columns: 1fr;
    }

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

    .admin-login-copy h1 {
        font-size: 42px;
    }

    .store-login-flow {
        grid-template-columns: 1fr 1fr;
    }

    .store-login-copy h1 {
        font-size: 42px;
    }
}

@media (max-width: 640px) {
    .workspace,
    .topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .modal {
        padding: 8px;
    }

    .modal-card {
        width: 100%;
        height: auto;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 10px;
    }

    .modal-head,
    .modal-foot {
        padding: 14px 16px;
    }

    .modal-head {
        min-height: 62px;
    }

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

    .modal-foot .btn {
        min-width: 92px;
    }

    .list-panel-head {
        padding: 14px;
    }

    .list-panel-title {
        align-items: flex-start;
    }

    .list-summary {
        grid-template-columns: 1fr;
    }

    .list-toolbar,
    .filters {
        align-items: stretch;
    }

    .list-toolbar > div,
    .filters,
    .search-field,
    .search-field .input,
    .verify-input,
    .list-toolbar .btn {
        width: 100%;
    }

    .table-status {
        padding: 10px 14px;
    }

    .table-actions-col {
        width: 140px;
        min-width: 140px;
    }

    .catalog-action-col {
        width: 188px;
        min-width: 188px;
    }

    .actions {
        gap: 6px;
    }

    .actions .link-btn {
        min-width: 64px;
        padding: 0 9px;
        min-height: 34px;
    }

    .catalog-action-col .actions {
        grid-template-columns: repeat(2, 70px);
        gap: 7px;
    }

    .catalog-action-col .actions .link-btn {
        width: 70px;
        min-width: 70px;
    }

    .stats-grid,
    .panel-grid,
    .detail-kpis,
    .detail-grid,
    .form-grid,
    .dashboard-actions,
    .dashboard-hero-metrics,
    .product-edit-metrics,
    .sync-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        min-height: auto;
        padding: 22px;
    }

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

    .dashboard-hero p {
        font-size: 15px;
    }

    .flow-row,
    .rank-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .rank-row b {
        display: none;
    }

    .product-edit-hero {
        padding: 16px;
    }

    .product-edit-hero h3 {
        font-size: 22px;
    }

    .rich-editor-head {
        display: grid;
    }

    .image-url-preview {
        grid-template-columns: 1fr;
    }

    .image-url-preview img {
        width: 100%;
        height: 160px;
    }

    .rich-editor-canvas {
        min-height: 220px;
        padding: 16px;
    }

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

    .detail-cover {
        width: 100%;
        height: 180px;
    }

    .entity-head {
        flex-direction: column;
    }

    .entity-count {
        width: 100%;
        justify-items: start;
        text-align: left;
    }

    .store-login-screen {
        padding: 28px 18px;
    }

    .admin-login-screen {
        padding: 28px 18px;
    }

    .admin-login-copy h1 {
        font-size: 34px;
    }

    .admin-login-copy p {
        font-size: 16px;
    }

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

    .admin-login-modules span {
        min-height: 76px;
    }

    .store-login-copy h1 {
        font-size: 34px;
    }

    .store-login-copy p {
        font-size: 16px;
    }

    .store-login-hero {
        gap: 26px;
    }

    .store-login-flow {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .store-welcome,
    .login-card {
        padding: 22px;
    }

    .store-welcome-meta {
        grid-template-columns: 1fr;
    }

    .welcome-actions .btn {
        width: 100%;
    }
}
