.admin-shell {
    --bg: #fff;
    --panel: #fff;
    --text: #202627;
    --muted: #737b80;
    --line: #e3e7e8;
    --workspace-accent: #256851;
    grid-template-columns: 210px minmax(0, 1fr);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
    letter-spacing: 0;
}

.admin-shell .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    padding: 22px 14px;
    background: #f8f9f9;
    color: #2c3436;
    border-right: 1px solid var(--line);
}

.admin-shell .brand {
    width: auto;
    height: auto;
    margin: 3px 12px 24px;
    background: none;
    color: #214f3d;
    text-indent: 0;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.3;
}

.admin-shell .nav { gap: 3px; }
.admin-shell .nav a, .admin-shell .logout-button {
    padding: 9px 10px;
    border-radius: 4px;
    color: #4e5b5a;
    font-size: 12px;
    line-height: 1.45;
}
.admin-shell .nav a:hover, .admin-shell .nav a.active, .admin-shell .logout-button:hover {
    background: #e7f0eb;
    color: #215b43;
}
.admin-shell .nav-divider { border-color: #e0e6e2; }
.pnl-nav { display: grid; gap: 3px; margin: 0 0 9px 18px; padding-left: 7px; border-left: 1px solid #dbe5df; }
.admin-shell .pnl-nav-link { padding: 8px; font-size: 11px; }
.admin-shell .site-status { border-color: #dce5df; color: #697672; font-size: 11px; }
.admin-shell .site-status b { color: #765d14; }
.admin-shell .site-toggle {
    border: 1px solid #d5dfd8;
    border-radius: 4px;
    background: transparent;
    color: #566e62;
    font-size: 11px;
}
.admin-shell .site-toggle:hover { border-color: #93b4a3; background: #e7f0eb; color: #215b43; }

.admin-shell .content { width: 100%; max-width: 1660px; margin: 0 auto; padding: 24px 30px; background: #fff; }
.admin-shell .topline { gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-shell .title { font-size: 26px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.admin-shell .topline .muted { margin-top: 5px; font-size: 12px; }
.admin-shell .section-title { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.admin-shell .content h2:not(.section-title) { font-size: 17px; line-height: 1.4; }
.admin-shell .panel { padding: 16px 0; border: 0; border-top: 1px solid var(--line); background: transparent; }
.admin-shell article.panel { padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.admin-shell .grid { gap: 14px; }
.admin-shell label { margin-bottom: 5px; color: #657277; font-size: 12px; font-weight: 500; }
.admin-shell input, .admin-shell select, .admin-shell textarea {
    min-height: 35px;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid #dfe4e5;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    line-height: 1.4;
}
.admin-shell textarea { min-height: 120px; }
.admin-shell input[type="checkbox"], .admin-shell input[type="radio"] { width: 15px; min-height: 15px; height: 15px; accent-color: var(--workspace-accent); }
.admin-shell input:focus-visible, .admin-shell select:focus-visible, .admin-shell textarea:focus-visible {
    outline: 2px solid #9dc4b1;
    outline-offset: 1px;
    border-color: #6f9d87;
}
.admin-shell :is(a, button, summary):focus-visible { outline: 2px solid #6f9d87; outline-offset: 3px; }
.admin-shell input:disabled, .admin-shell select:disabled { background: #f4f6f5; color: #8a9590; }
.admin-shell .actions { gap: 7px; }
.admin-shell .button {
    min-height: 34px;
    max-width: 100%;
    padding: 7px 12px;
    border: 1px solid var(--workspace-accent);
    border-radius: 5px;
    background: var(--workspace-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    box-shadow: none;
}
.admin-shell .button.secondary { border-color: #dce2df; background: #fff; color: #34463e; }
.admin-shell .button.danger { border-color: #e8cccc; background: #fff; color: #b25050; }
.admin-shell .button:hover { filter: brightness(.95); }
.admin-shell .button:disabled { opacity: .55; cursor: not-allowed; }
.admin-shell .form-footer { gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.admin-shell .stats { gap: 12px; margin-bottom: 18px; }
.admin-shell .stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; }
.admin-shell .stat b { margin-bottom: 3px; font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-shell .stat:first-child { background: #eff7f2; }
.admin-shell .stat .muted { font-size: 12px; }

.admin-shell .table-wrap { min-width: 0; overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.admin-shell table { min-width: 680px; font-size: 12px; font-variant-numeric: tabular-nums; }
.admin-shell th, .admin-shell td { padding: 9px 12px; border-color: #edf0f1; line-height: 1.45; }
.admin-shell thead th { background: #f7f9f9; color: #748087; font-size: 11px; font-weight: 500; text-transform: none; white-space: nowrap; }
.admin-shell tbody tr:hover { background: #f8fbfa; }
.admin-shell tbody tr:last-child td { border-bottom: 0; }
.admin-shell td strong { font-weight: 500; }
.admin-shell td .muted { font-size: 11px; }
.admin-shell td .button { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.admin-shell .thumb { width: 42px; height: 42px; border: 0; border-radius: 4px; background: #fff; }
.admin-shell .pagination { gap: 5px; }
.admin-shell .pagination :is(a, span) { padding: 6px 9px; border-color: var(--line); border-radius: 4px; font-size: 12px; }
.admin-shell .pagination .active span { border-color: #c5dbce; background: #e7f0eb; color: #215b43; }
.admin-shell .flash { padding: 10px 12px; border: 1px solid #cfe2d6; border-radius: 5px; background: #eef7f1; color: #2e6248; font-size: 12px; }
.admin-shell .errors { padding: 10px 12px; border-color: #eed4d4; border-radius: 5px; background: #fcf3f3; color: #a34848; font-size: 12px; }

.admin-shell .cost-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; }
.admin-shell .cost-summary > div { min-width: 0; padding: 12px; border-right: 1px solid var(--line); background: #fff; color: var(--text); }
.admin-shell .cost-summary > div:last-child { border-right: 0; background: #eff7f2; }
.admin-shell .cost-summary span { color: var(--muted); font-size: 11px; }
.admin-shell .cost-summary b { font-size: 18px; overflow-wrap: anywhere; }
.admin-shell .product-results { border-color: var(--line); border-radius: 5px; box-shadow: 0 10px 24px #20372c14; }
.admin-shell .product-result:hover { background: #edf6f0; }
.admin-shell .quantity-control { grid-template-columns: 30px 64px 30px; }
.admin-shell .quantity-control button { min-height: 34px; border-color: var(--line); border-radius: 4px; font-size: 18px; }
.admin-shell .quantity-control button:hover { border-color: #a4bfae; background: #edf6f0; }
.admin-shell .sku { border-radius: 3px; background: #edf5ef; color: #36674e; font-size: 11px; }
.admin-shell .market-sync-track { height: 8px; border: 0; border-radius: 3px; background: #edf1ef; }
.admin-shell .market-sync-fill { background: #66a48b; }
.admin-shell .market-sync-fill.running { background-image: repeating-linear-gradient(45deg, #66a48b 0, #66a48b 10px, #8bbca6 10px, #8bbca6 12px); }

@media (max-width: 1100px) {
    .admin-shell .content { padding: 22px; }
    .admin-shell .cost-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-shell .cost-summary > div { border-bottom: 1px solid var(--line); }
}
@media (max-width: 820px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-shell .sidebar { position: static; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-shell .brand { margin: 0 0 8px; font-size: 18px; }
    .admin-shell .nav { display: flex; gap: 4px; overflow-x: auto; align-items: center; }
    .admin-shell .nav > a, .admin-shell .nav > form { flex-shrink: 0; width: auto; white-space: nowrap; }
    .admin-shell .nav-divider, .admin-shell .site-status { display: none; }
    .admin-shell .pnl-nav { display: none; }
    .admin-shell .content { padding: 18px 16px; }
    .admin-shell .topline { align-items: flex-start; }
    .admin-shell .title { font-size: 23px; }
    .admin-shell .grid.two { grid-template-columns: 1fr; }
    .admin-shell .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .admin-shell .stat { padding: 12px; }
    .admin-shell .stat b { font-size: 21px; }
}
@media (max-width: 520px) {
    .admin-shell .stats { grid-template-columns: 1fr; }
    .admin-shell .cost-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-shell .extra-cost-row { grid-template-columns: minmax(0, 1fr) minmax(90px, .65fr) auto; }
}
