:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --line: #d9e6ed;
    --text: #000000;
    --muted: #3a3a3a;
    --brand: #0092cf;
    --brand-2: #0092cf;
    --brand-3: #e6f6fc;
    --danger: #b84a4a;
    --shadow: 0 14px 32px rgba(0, 146, 207, 0.10);
    --radius: 18px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}
a { color: inherit; text-decoration: none; }
button, .button-link {
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    padding: 0.85rem 1.2rem;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
}
.secondary {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--brand);
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    font: inherit;
    background: var(--panel-strong);
    color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
.app-shell { display: flex; min-height: calc(100vh - 72px); }
.sidebar {
    width: 290px;
    padding: 1.5rem;
    background: #ffffff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.brand-block {
    display: grid;
    gap: 0.85rem;
}
.brand-title {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
}
.brand-logo {
    display: block;
    width: 100%;
    max-width: 210px;
    height: auto;
    object-fit: contain;
}
.nav {
    display: grid;
    gap: 0.55rem;
    flex: 1;
    min-height: 0;
}
.nav a { padding: 0.8rem 0.9rem; border-radius: 14px; }
.nav a:hover { background: var(--brand-3); }
.nav-group {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.2rem;
}
.nav-group-title {
    padding: 0 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.nav-subgroup {
    display: grid;
    gap: 0.35rem;
    padding-left: 0.35rem;
    border-left: 2px solid var(--line);
    margin-left: 0.9rem;
}
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.icon-button {
    width: 44px;
    height: 44px;
    padding: 0;
    flex: 0 0 auto;
}
.icon-button svg {
    width: 20px;
    height: 20px;
}
.main-content { flex: 1; padding: 1.2rem; background: #ffffff; }
.main-content.no-sidebar { display: flex; align-items: center; justify-content: center; }
.page { display: grid; gap: 1.2rem; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hero-card, .card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.brand-hero {
    max-width: 580px;
    position: relative;
    overflow: hidden;
}
.brand-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 146, 207, 0.08), rgba(0, 146, 207, 0.02));
    pointer-events: none;
}
.brand-hero > * { position: relative; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.filter-sections {
    align-items: start;
}
.stack { display: grid; gap: 0.8rem; }
.inline-form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.filter-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.quick-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.error { color: var(--danger); min-height: 1.2rem; margin: 0; }
.list { display: grid; gap: 0.6rem; }
.compact-list .list-item { padding: 0.7rem 0.9rem; }
.list-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--line);
}
.selectable {
    width: 100%;
    text-align: left;
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line);
}
.selected-product, .divider-text {
    padding: 0.8rem 1rem;
    border-radius: 14px;
    background: var(--brand-3);
    border: 1px dashed rgba(0, 146, 207, 0.32);
}
.divider-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}
.big-number { font-size: 3rem; font-weight: bold; color: var(--brand); }
.inventory-number { font-size: 2rem; }
.hidden { display: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
    padding: 0.8rem 0.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    color: var(--text);
}
dialog { border: 0; border-radius: 18px; padding: 0; max-width: 540px; width: calc(100% - 2rem); }
.modal-form { padding: 1.25rem; background: var(--panel); }
video { width: 100%; background: #111; border-radius: 16px; min-height: 280px; object-fit: cover; }
.compact-field { min-width: 180px; }
.order-card .inline-form { margin-top: 0.35rem; }
.order-section {
    padding-top: 0.25rem;
}
.status-badge {
    color: var(--brand);
}
.danger-button {
    background: transparent;
    color: var(--danger);
    border: 1px solid rgba(184, 74, 74, 0.35);
}
.site-footer {
    background: #1F1F1F;
    color: #ffffff;
    padding: 1rem 1.2rem;
}
.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.selected-product.is-clickable {
    cursor: pointer;
}
.selectable.is-active {
    border-color: var(--brand);
    background: var(--brand-3);
}
@media print {
    .sidebar, .page-header button, .quick-actions, #purchase-order-list, #purchase-order-generate-form, #purchase-order-manual-form, .site-footer { display: none !important; }
    .main-content { padding: 0; }
    .card { box-shadow: none; border: 0; }
}
@media (max-width: 920px) {
    .app-shell { display: block; }
    .sidebar { width: auto; height: auto; position: relative; }
    .brand-logo { max-width: 180px; }
    .brand-title { font-size: 1.2rem; }
    .grid.two { grid-template-columns: 1fr; }
}
