/* Production uses the portal's shared controls and compact, unframed sections. */
.production-module { min-width: 0; }
.production-mobile-menu { display: none; }
.production-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; padding: 0 0 12px; }
.production-nav a { padding: 5px 0; font-weight: 600; }
.production-form { display: grid; gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.production-form h2, .production-section h2, .production-run-summary h2 { font-size: 18px; margin: 0 0 12px; }
.production-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.production-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.production-field input, .production-field select, .production-field textarea { width: 100%; min-width: 0; max-width: 100%; }
.production-field textarea { min-height: 96px; resize: vertical; }
.production-field-error { color: #b42318; font-size: 12px; }
.production-field [aria-invalid="true"] { border-color: #b42318; }
.production-section { padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.production-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.production-section-head h2 { margin: 0; }
.production-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 16px 0 24px; }
.production-filters .form-actions { margin: 0; }
.production-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; color: var(--muted); }
.production-worker { border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 0; min-width: 0; background: #fff; }
.production-worker legend { font-weight: 700; padding: 0 8px; }
.production-workers { display: grid; gap: 16px; }
.production-worker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; }
.production-worker-grid button { justify-self: start; }
.production-check { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 8px 0; }
.production-check input { width: auto; min-height: 0; flex: 0 0 auto; }
.production-supervisors { min-width: 0; border: 1px solid var(--line); }
.production-calculation { color: var(--teal); font-weight: 700; padding: 10px 0; border-block: 1px solid var(--line-soft); }
.production-status { display: inline-flex; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; background: #edf2f8; color: #344054; white-space: nowrap; }
.production-status-active, .production-status-submitted, .production-status-completed { background: #e4f4ec; color: #176945; }
.production-status-maintenance, .production-status-reopened { background: #fff4d6; color: #795600; }
.production-status-inactive, .production-status-deleted, .production-status-cancelled { background: #fbeae9; color: #a52d25; }
.production-report-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 0; }
.production-run-summary { padding: 24px 0; border-bottom: 1px solid var(--line); }
.production-note { white-space: normal; overflow-wrap: anywhere; }
.production-admin-tools { padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.production-admin-tools form { display: grid; align-content: start; gap: 12px; }
.production-record { padding: 16px 0; }
.production-module .table-wrap { max-width: 100%; }
.production-module th { white-space: nowrap; }
.production-module td { overflow-wrap: anywhere; }
.production-print { background: white; padding: 20px; color: #111; }
.production-print-document { background: white; }
.production-print main { max-width: 1200px; margin: auto; }
.production-print-header { display: flex; gap: 24px; align-items: center; border-bottom: 2px solid #333; padding-bottom: 16px; }
.production-print-header img { width: 120px; height: auto; }
.production-print-header h1 { font-size: 24px; }
.production-print-toolbar { display: flex; gap: 12px; margin: 0 auto 24px; max-width: 1200px; }
@media (max-width: 1100px) {
    .production-form-grid, .production-filters, .production-worker-grid, .production-admin-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .production-body .sidebar { position: relative; padding: 12px 16px; }
    .production-body .sidebar .brand { margin: 0; padding-right: 48px; min-height: 48px; }
    .production-body .sidebar .brand-logo-wrap { display: none; }
    .production-body .sidebar .sidebar-footer { display: none; }
    .production-enhanced .sidebar .side-nav { display: none; }
    .production-enhanced .sidebar.production-menu-open .side-nav { display: flex; margin-top: 16px; }
    .production-enhanced .production-mobile-menu { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; position: absolute; top: 16px; right: 16px; font-size: 22px; padding: 0; }
    .production-form-grid, .production-filters, .production-worker-grid, .production-admin-tools { grid-template-columns: minmax(0, 1fr); }
    .production-section-head, .production-pagination { align-items: stretch; flex-direction: column; }
    .production-nav { gap: 4px 14px; }
    .production-print { padding: 12px; }
}
@media print {
    @page production-report { size: A4 landscape; margin: 12mm; }
    .production-print-toolbar { display: none !important; }
    .production-print { page: production-report; padding: 0; font-size: 10px; }
    .production-print main { max-width: none; }
    .production-print .table-wrap { overflow: visible; border: 0; box-shadow: none; }
    .production-print table { table-layout: fixed; width: 100%; }
    .production-print th, .production-print td { padding: 5px; font-size: 9px; overflow-wrap: anywhere; white-space: normal; }
    .production-print thead { display: table-header-group; }
    .production-print tr { break-inside: avoid; }
    .production-print .production-run-summary { break-inside: avoid; padding: 12px 0; }
    .production-print .production-run-summary h2 { font-size: 14px; margin: 0 0 6px; }
    .production-print .production-run-summary p { margin: 6px 0; }
    .production-print h2 { break-after: avoid; }
    .production-print a { color: #111; }
}

:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #172033;
    --accent: #1f6feb;
    --accent-strong: #174ea6;
    --accent-soft: #eaf2ff;
    --gold: #c79a2c;
    --teal: #0f8b8d;
    --ink: #172033;
    --sidebar: #f8fbff;
    --sidebar-soft: #eaf2ff;
    --sidebar-line: #d7e4f5;
    --sidebar-text: #344054;
    --sidebar-muted: #667085;
    --muted: #667085;
    --line: #d7dde5;
    --line-soft: #e7ebf0;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --shadow: 0 14px 34px rgba(16, 24, 40, .08);
    --shadow-soft: 0 8px 18px rgba(16, 24, 40, .05);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    background: #f4f6f8;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
    font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

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

.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, var(--sidebar) 100%);
    border-right: 1px solid var(--sidebar-line);
    box-shadow: 10px 0 26px rgba(31, 111, 235, .06);
    color: var(--sidebar-text);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 22px;
    min-height: 100vh;
    padding: 18px 16px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: grid;
    gap: 10px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 4px 2px 10px;
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo-wrap {
    align-items: center;
    display: flex;
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 42px;
}

.inka-brand-logo {
    display: block;
    height: auto;
    max-height: 42px;
    max-width: 132px;
    object-fit: contain;
    width: 100%;
}

.brand-mark {
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid #cbdcff;
    border-radius: 8px;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    position: relative;
    width: 34px;
}

.brand-mark::before,
.brand-mark::after {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    display: block;
    position: absolute;
}

.brand-mark::before {
    height: 16px;
    width: 4px;
}

.brand-mark::after {
    height: 4px;
    width: 16px;
}

.brand-text {
    color: var(--ink);
    font-size: 15px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.nav-link {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--sidebar-text);
    cursor: pointer;
    display: flex;
    gap: 11px;
    min-height: 42px;
    min-width: 0;
    padding: 9px 10px;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.nav-link:hover {
    background: var(--sidebar-soft);
    border-color: var(--sidebar-line);
    color: var(--accent-strong);
    text-decoration: none;
}

.nav-link.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(31, 111, 235, .18);
    color: #ffffff;
    font-weight: 700;
}

.nav-glyph {
    align-items: center;
    background: #eef4ff;
    border: 1px solid var(--sidebar-line);
    border-radius: 7px;
    display: inline-flex;
    flex: 0 0 22px;
    height: 22px;
    justify-content: center;
    position: relative;
    width: 22px;
}

.nav-link.active .nav-glyph {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .35);
}

.nav-glyph::before {
    background: currentColor;
    border-radius: 3px;
    content: "";
    display: block;
    height: 9px;
    opacity: .9;
    width: 9px;
}

.glyph-dashboard::before {
    box-shadow: -5px -5px 0 -2px currentColor, 5px -5px 0 -2px currentColor, -5px 5px 0 -2px currentColor, 5px 5px 0 -2px currentColor;
}

.glyph-clients::before,
.glyph-users::before,
.glyph-account::before {
    border-radius: 999px;
}

.glyph-folders::before {
    border-radius: 2px;
    box-shadow: -5px 0 0 -1px currentColor, 5px 0 0 -1px currentColor;
}

.glyph-files::before {
    height: 12px;
    width: 8px;
}

.glyph-offers::before {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 2px;
    height: 12px;
    width: 10px;
}

.glyph-catalog::before {
    background: var(--gold);
    border-radius: 2px;
    box-shadow: 0 5px 0 -1px currentColor;
    height: 5px;
    width: 13px;
}

.glyph-statistics::before {
    border-radius: 2px 2px 0 0;
    box-shadow: 5px -4px 0 -1px currentColor, 10px -8px 0 -2px currentColor;
    height: 8px;
    width: 4px;
}

.glyph-shares::before {
    border-radius: 999px;
    box-shadow: 8px 0 0 -2px currentColor;
}

.glyph-warehouse::before {
    background: var(--teal);
    box-shadow: 0 -5px 0 -2px var(--teal), 0 5px 0 -2px var(--teal);
}

.glyph-accounting::before {
    border-radius: 2px;
    box-shadow: -5px 0 0 -2px currentColor, 5px 0 0 -2px currentColor, 0 5px 0 -2px currentColor;
}

.glyph-operations::before {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 4px;
    box-shadow: 6px 6px 0 -3px currentColor;
    height: 12px;
    width: 12px;
}

.glyph-export::before {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 999px;
    box-shadow: 7px 0 0 -3px currentColor;
    height: 12px;
    width: 12px;
}

.glyph-notifications::before {
    background: var(--gold);
    border-radius: 999px 999px 3px 3px;
}

.glyph-todos::before {
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 3px;
    box-shadow: 5px 5px 0 -3px currentColor;
    height: 12px;
    width: 10px;
}

.glyph-audit::before,
.glyph-settings::before,
.glyph-backups::before {
    border-radius: 2px;
}

.glyph-logout::before {
    background: #ef4444;
    height: 4px;
    width: 12px;
}

.notification-badge {
    background: #dc2626;
    border-radius: 999px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    margin-left: auto;
    min-width: 20px;
    padding: 4px 6px;
    text-align: center;
}

.nav-divider {
    border-top: 1px solid var(--sidebar-line);
    margin: 10px 4px;
}

.logout-form {
    margin: 0;
}

.side-nav button.nav-link {
    box-shadow: none;
    justify-content: flex-start;
}

.sidebar-footer {
    background: #ffffff;
    border: 1px solid var(--sidebar-line);
    border-radius: 8px;
    color: var(--sidebar-muted);
    display: grid;
    gap: 3px;
    padding: 13px;
}

.sidebar-footer strong {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer em {
    color: var(--accent-strong);
    font-style: normal;
    font-weight: 700;
}

.workspace-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.workspace-topbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 72px;
    padding: 16px 28px;
}

.workspace-topbar strong {
    color: var(--ink);
    display: block;
    font-size: 20px;
}

.topbar-kicker {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.topbar-status {
    background: #eefdf9;
    border: 1px solid #b8eee1;
    border-radius: 999px;
    color: #087568;
    font-size: 12px;
    font-weight: 750;
    padding: 7px 10px;
    white-space: nowrap;
}

.public-shell {
    align-items: center;
    display: grid;
    min-height: 100vh;
    padding: 24px;
}

.public-card {
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: 960px;
    width: min(100%, 960px);
}

.container {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px;
    width: 100%;
}

.content-body {
    flex: 1;
    overflow: auto;
}

.page-head {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.explorer-head {
    align-items: flex-end;
}

.crumb {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    color: var(--ink);
    letter-spacing: 0;
    margin: 0;
}

h1 {
    font-size: 28px;
    font-weight: 760;
}

h2 {
    font-size: 18px;
    margin: 22px 0 12px;
}

h3 {
    font-size: 16px;
}

p {
    margin-top: 0;
}

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

.explorer-pane,
.panel,
.table-wrap,
.card,
.toolbar,
.box {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.explorer-pane,
.panel {
    padding: 18px;
}

.explorer-commandbar {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    min-height: 50px;
    padding: 10px;
}

.command-title {
    color: var(--ink);
    font-weight: 750;
    margin-right: auto;
}

.command-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.command-pill {
    background: #fff7df;
    border: 1px solid #ead293;
    border-radius: 999px;
    color: #86620f;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    white-space: nowrap;
}

.explorer-filters {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(150px, 190px) minmax(150px, 190px) minmax(130px, 160px) minmax(130px, 160px) auto;
    padding: 12px;
}

.folder-searchbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    padding: 12px;
}

.explorer-search,
.folder-search {
    min-width: 0;
}

.filter-field {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 8px 10px 10px;
}

.filter-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .12);
}

.field-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-field input,
.filter-field select {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-height: 24px;
    padding: 0;
}

.filter-field input:focus,
.filter-field select:focus {
    background: transparent;
    box-shadow: none;
}

.select-wrap {
    display: grid;
    min-width: 0;
    position: relative;
}

.select-wrap::after {
    border-bottom: 2px solid var(--muted);
    border-right: 2px solid var(--muted);
    content: "";
    height: 7px;
    pointer-events: none;
    position: absolute;
    right: 2px;
    top: 7px;
    transform: rotate(45deg);
    width: 7px;
}

.select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 24px;
}

.filter-actions,
.form-actions,
.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.form-card {
    background: #ffffff;
}

.form-card-head {
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    gap: 6px;
    margin: -2px 0 2px;
    padding-bottom: 14px;
}

.form-card-head .command-pill {
    justify-self: start;
}

.form-card-head p {
    margin: 0;
}

.form-field {
    box-shadow: none;
}

.field-help {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    margin-top: 6px;
}

.panel-inset {
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 12px 14px;
}

.panel-inset p {
    margin: 4px 0 0;
}

.module-permission-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.module-permission {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
}

.module-permission input {
    flex: 0 0 auto;
    min-height: auto;
    width: auto;
}

.permission-setup-card {
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 14px;
}

.user-permission-form {
    gap: 16px;
}

.user-identity-grid,
.company-access-controls {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-invite-option {
    align-self: end;
}

.user-invite-option:empty {
    display: none;
}

.role-select-field {
    margin-top: 14px;
    max-width: 620px;
}

.permission-setup-head {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.permission-setup-head h2 {
    margin: 0;
}

.permission-setup-head p {
    margin: 4px 0 0;
}

.permission-preset-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.company-access-controls {
    margin-top: 14px;
}

.company-access-picker {
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    margin-top: 14px;
    padding: 12px;
}

.company-access-picker[hidden] {
    display: none;
}

.company-access-picker-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.company-access-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    max-height: 260px;
    overflow: auto;
}

.company-access-option {
    align-items: center;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    gap: 9px;
    min-height: 42px;
    padding: 9px 10px;
}

.company-access-option:has(input:checked) {
    background: #edf5ff;
    border-color: #9fc5f8;
}

.company-access-option input {
    flex: 0 0 auto;
    min-height: auto;
    width: auto;
}

.company-access-empty {
    margin: 0;
}

.permission-details {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    overflow: hidden;
}

.permission-details summary {
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    padding: 14px;
}

.permission-details summary::-webkit-details-marker {
    display: none;
}

.permission-details summary::after {
    color: var(--muted);
    content: '+';
    float: right;
    font-size: 18px;
    line-height: 1;
}

.permission-details[open] summary::after {
    content: '-';
}

.permission-details[open] summary {
    border-bottom: 1px solid var(--line-soft);
}

.permission-groups {
    display: grid;
    gap: 14px;
    padding: 0 14px 14px;
}

.permission-group {
    border-top: 1px solid var(--line-soft);
    padding-top: 14px;
}

.permission-group h3 {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .04em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.folder-permission-tools {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.folder-permission-tools select {
    min-width: 190px;
}

.advanced-folder-permissions {
    display: grid;
    gap: 14px;
    padding: 14px;
}

.advanced-folder-permissions h3 {
    margin: 0;
}

.advanced-folder-permissions p {
    margin: 4px 0 0;
}

.folder-permission-table td:first-child {
    min-width: 250px;
}

.folder-permission-table td:first-child small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 3px;
}

.folder-permission-table td:not(:first-child),
.folder-permission-table th:not(:first-child) {
    text-align: center;
    width: 84px;
}

.folder-permission-table input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

.user-save-actions {
    justify-content: flex-end;
}

.section-title {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin: 18px 0 10px;
    text-transform: uppercase;
}

.explorer-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.folder-tile {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 12px;
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 82px;
    padding: 14px;
    text-decoration: none;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.folder-tile:hover {
    border-color: #bdd1f7;
    box-shadow: var(--shadow);
    text-decoration: none;
    transform: translateY(-1px);
}

.tile-icon {
    align-items: center;
    background: #f7f9fc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: flex;
    height: 42px;
    justify-content: center;
    position: relative;
    width: 42px;
}

.folder-icon::before,
.folder-icon::after {
    background: var(--gold);
    border-radius: 999px;
    content: "";
    height: 4px;
    position: absolute;
    width: 22px;
}

.folder-icon::before {
    transform: translateY(-5px);
}

.folder-icon::after {
    transform: translateY(5px);
}

.tile-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tile-title,
.file-name,
.share-card-copy strong,
.warehouse-reel-row strong,
.warehouse-reel-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tile-meta {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-empty {
    background: var(--surface-soft);
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 650;
    padding: 22px;
    text-align: center;
}

.file-list,
.warehouse-reel-list,
.warehouse-movement-list {
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    overflow: hidden;
}

.file-list-head {
    background: #f8fafc;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 10px 12px 10px 66px;
    text-transform: uppercase;
}

.file-row {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
    min-height: 70px;
    padding: 11px 12px;
}

.file-row + .file-row,
.warehouse-reel-row + .warehouse-reel-row,
.warehouse-movement-row + .warehouse-movement-row {
    border-top: 1px solid var(--line-soft);
}

.file-row:hover,
.warehouse-reel-row:hover,
.warehouse-movement-row:hover {
    background: #fbfcfe;
}

.file-icon {
    align-items: center;
    background: #eef3f8;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    display: flex;
    height: 38px;
    justify-content: center;
    position: relative;
    width: 38px;
}

.file-icon::before {
    background: #778293;
    border-radius: 999px;
    content: "";
    height: 8px;
    width: 8px;
}

.file-icon::after {
    background: #778293;
    border-radius: 999px;
    bottom: 9px;
    content: "";
    height: 3px;
    left: 10px;
    position: absolute;
    right: 10px;
}

.file-icon-pdf::before,
.file-icon-pdf::after {
    background: #dc2626;
}

.file-icon-doc::before,
.file-icon-doc::after {
    background: var(--accent);
}

.file-icon-sheet::before,
.file-icon-sheet::after {
    background: #16a34a;
}

.file-icon-image::before,
.file-icon-image::after {
    background: #8b5cf6;
}

.file-icon-zip::before,
.file-icon-zip::after {
    background: var(--gold);
}

.file-info {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.file-name {
    color: var(--ink);
    font-weight: 750;
}

.file-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px 12px;
}

.file-badge,
.reel-status {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 999px;
    color: #067647;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
    text-transform: capitalize;
    white-space: nowrap;
}

.file-badge.is-archived {
    background: #f2f4f7;
    border-color: #d0d5dd;
    color: #475467;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.file-actions .button {
    min-height: 34px;
    padding: 7px 10px;
}

.shares-responsive {
    overflow: hidden;
}

.share-card-list {
    display: grid;
    gap: 12px;
}

.share-card {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 14px;
}

.share-card:hover {
    border-color: #bdd1f7;
}

.share-card-main {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(0, 1fr);
    min-width: 0;
}

.share-card-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.share-card-copy strong {
    color: var(--ink);
}

.share-link-box {
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--accent);
    display: block;
    font-size: 12px;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 8px 10px;
}

.share-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.share-card-meta > span {
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    color: var(--muted);
    display: grid;
    font-size: 12px;
    gap: 5px;
    min-width: 88px;
    padding: 8px 10px;
}

.share-card-meta strong {
    color: #475467;
    font-size: 11px;
    text-transform: uppercase;
}

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

.share-card-actions form {
    margin: 0;
}

.low-stock-alert {
    align-items: center;
    background: #fff8eb;
    border: 1px solid #fedf89;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, .65fr) minmax(0, 1fr) auto;
    margin-bottom: 16px;
    padding: 14px;
}

.low-stock-alert > div:first-child {
    display: grid;
    gap: 7px;
}

.low-stock-alert strong {
    color: #93370d;
}

.low-stock-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.low-stock-list span {
    background: #ffffff;
    border: 1px solid #fedf89;
    border-radius: 999px;
    color: #93370d;
    font-size: 12px;
    padding: 7px 9px;
}

.warehouse-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 230px) minmax(140px, 180px) minmax(120px, 150px) auto;
    padding: 12px;
}

.checkbox-field {
    justify-content: center;
}

.checkline {
    align-items: center;
    color: #344054;
    display: flex;
    font-size: 13px;
    gap: 8px;
}

.checkline input {
    min-height: auto;
    width: auto;
}

.warehouse-section {
    margin-bottom: 20px;
    min-width: 0;
}

.warehouse-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.warehouse-card {
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 15px;
}

.warehouse-card.is-low {
    border-color: #fda29b;
}

.warehouse-card-head {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.warehouse-card h2 {
    font-size: 17px;
    margin: 0;
    overflow-wrap: anywhere;
}

.warehouse-meter {
    background: #eaecf0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.warehouse-meter span {
    background: var(--teal);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.warehouse-card.is-low .warehouse-meter span {
    background: #ef6820;
}

.warehouse-card-meta {
    color: var(--muted);
    display: grid;
    gap: 5px;
    font-size: 12px;
}

.warehouse-card-meta strong {
    color: var(--ink);
}

.warehouse-card-actions {
    display: flex;
    justify-content: flex-end;
}

.warehouse-reel-row {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(180px, 1.4fr) minmax(130px, .7fr) minmax(120px, .7fr) auto minmax(190px, auto);
    min-height: 68px;
    padding: 12px;
}

.warehouse-reel-row > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.warehouse-reel-row .button {
    justify-self: end;
    min-height: 34px;
    padding: 7px 10px;
}

.warehouse-row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.reel-status.status-reserved,
.reel-status.status-adjust {
    background: #fffaeb;
    border-color: #fedf89;
    color: #93370d;
}

.reel-status.status-used,
.reel-status.status-out,
.reel-status.status-info {
    background: var(--accent-soft);
    border-color: #bdd1f7;
    color: var(--accent-strong);
}

.reel-status.status-scrap,
.reel-status.status-critical {
    background: #fef3f2;
    border-color: #fecdca;
    color: #b42318;
}

.reel-status.status-warning {
    background: #fffaeb;
    border-color: #fedf89;
    color: #93370d;
}

.warehouse-movement-row {
    align-items: center;
    color: #344054;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 120px minmax(180px, 1fr) minmax(140px, .8fr) minmax(180px, 1fr);
    min-height: 52px;
    padding: 10px 12px;
}

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

.notifications-pane {
    overflow: hidden;
}

.notifications-pane table {
    table-layout: auto;
}

.notifications-pane th:first-child,
.notifications-pane td:first-child {
    width: 120px;
}

.notifications-pane th:nth-child(3),
.notifications-pane td:nth-child(3) {
    width: 180px;
}

.notifications-pane th:last-child,
.notifications-pane td:last-child {
    width: 190px;
}

.notification-type {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.notification-type em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.notification-level {
    justify-self: start;
    min-width: 74px;
    text-align: center;
}

.todo-board {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(280px, .42fr) minmax(0, 1fr);
}

.todo-create-card {
    min-width: 0;
}

.todo-create-card .grid {
    grid-template-columns: 1fr;
}

.todo-create-card .form-field {
    min-width: 0;
}

.todo-create-card input,
.todo-create-card select,
.todo-create-card textarea {
    max-width: 100%;
}

.todo-list {
    display: grid;
    gap: 12px;
}

.todo-items {
    display: grid;
    gap: 10px;
}

.todo-item {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    overflow: hidden;
}

.todo-item.is-done {
    background: #f8fafc;
    opacity: .78;
}

.todo-summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: 16px minmax(0, 1fr) minmax(220px, auto);
    list-style: none;
    min-height: 54px;
    padding: 10px 12px;
}

.todo-summary::-webkit-details-marker {
    display: none;
}

.todo-summary::marker {
    content: "";
}

.todo-summary::before {
    color: var(--muted);
    content: ">";
    font-size: 14px;
    font-weight: 900;
    grid-column: 1;
    transform: translateX(-2px);
}

.todo-item[open] .todo-summary::before {
    transform: rotate(90deg) translateY(1px);
}

.todo-title-line {
    align-items: center;
    display: flex;
    gap: 8px;
    grid-column: 2;
    min-width: 0;
}

.todo-title-line strong {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-title-line em {
    background: #f2f4f7;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    padding: 4px 8px;
    text-transform: uppercase;
}

.todo-summary-meta {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-column: 3;
    grid-template-columns: minmax(86px, auto) minmax(108px, auto);
    justify-content: end;
}

.todo-dropdown {
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: 10px;
    padding: 12px;
}

.todo-edit-form {
    display: grid;
    gap: 10px;
}

.todo-main {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, .9fr);
}

.todo-main input {
    font-weight: 800;
}

.todo-main textarea {
    min-height: 42px;
    resize: vertical;
}

.todo-meta-fields {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(120px, 160px)) auto;
    justify-content: start;
}

.todo-meta-fields label {
    color: var(--muted);
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 4px;
    text-transform: uppercase;
}

.todo-priority {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
    padding: 8px 10px;
    text-align: center;
}

.todo-priority.priority-urgent {
    background: #fef3f2;
    border-color: #fecdca;
    color: #b42318;
}

.todo-priority.priority-high {
    background: #fffaeb;
    border-color: #fedf89;
    color: #93370d;
}

.todo-priority.priority-normal {
    background: #eff8ff;
    border-color: #b2ddff;
    color: #175cd3;
}

.todo-priority.priority-low {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #047857;
}

.todo-due {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.todo-actions,
.todo-dropdown-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.todo-dropdown-actions {
    border-top: 1px dashed var(--line-soft);
    justify-content: start;
    padding-top: 10px;
}

.notification-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.notification-title {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.notification-content p {
    margin: 4px 0;
}

.notification-message {
    overflow-wrap: anywhere;
}

.notification-time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.notification-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    min-width: 0;
}

.notification-actions form {
    margin: 0;
}

.notification-actions .button,
.notification-actions button {
    min-height: 34px;
    padding: 7px 11px;
    width: auto;
}

.backup-grid {
    align-items: stretch;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.backup-checklist {
    color: #344054;
    margin: 0;
    padding-left: 22px;
}

.backup-checklist li + li {
    margin-top: 8px;
}

.tag-list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-pill {
    --tag-color: #2563eb;
    align-items: center;
    background: color-mix(in srgb, var(--tag-color) 14%, white);
    border: 1px solid color-mix(in srgb, var(--tag-color) 26%, white);
    border-radius: 999px;
    color: color-mix(in srgb, var(--tag-color) 82%, #101827);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    line-height: 1;
    padding: 5px 10px;
}

.inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inline-form input {
    min-width: 120px;
}

.checkbox-row {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.folder-create-panel {
    position: sticky;
    top: 18px;
}

.narrow {
    margin: 38px auto;
    max-width: 480px;
}

.login-card {
    text-align: center;
}

.login-logo {
    display: block;
    height: auto;
    margin: 0 auto 16px;
    max-height: 64px;
    max-width: 190px;
    object-fit: contain;
    width: min(100%, 190px);
}

.login-card form {
    margin-top: 18px;
    text-align: left;
}

.stack {
    display: grid;
    gap: 16px;
}

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

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

.card {
    padding: 17px;
}

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

.card strong {
    color: var(--ink);
    display: block;
    font-size: 30px;
    line-height: 1.1;
    margin-top: 8px;
}

.toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
}

label {
    color: #344054;
    display: grid;
    font-size: 13px;
    font-weight: 650;
    gap: 6px;
}

input,
select,
textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: var(--ink);
    min-height: 40px;
    padding: 9px 11px;
    transition: border-color .14s ease, box-shadow .14s ease;
    width: 100%;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #667085 50%),
        linear-gradient(135deg, #667085 50%, transparent 50%);
    background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 36px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, .12);
    outline: 0;
}

.select-wrap select {
    background-image: none;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button {
    align-items: center;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 750;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    text-decoration: none;
    white-space: nowrap;
}

button:hover,
.button:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    text-decoration: none;
}

.secondary,
.toolbar button {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #344054;
}

.secondary:hover,
.toolbar button:hover {
    background: #f8fafc;
    border-color: #98a2b3;
    color: #1d2939;
}

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

.inline-actions form {
    margin: 0;
}

.setup-link-copy {
    border-color: #b8cff5;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.10);
    margin-bottom: 18px;
}

.setup-link-copy input[readonly] {
    background: #f8fbff;
    border-color: #b8cff5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.invite-mail-status {
    font-weight: 700;
}

.danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.danger:hover {
    background: #b42318;
    border-color: #b42318;
}

.side-nav button.nav-link {
    background: transparent;
    border: 1px solid transparent;
    color: var(--sidebar-text);
    font-weight: 500;
    justify-content: flex-start;
    min-height: 42px;
    padding: 9px 10px;
}

.side-nav button.nav-link:hover {
    background: var(--sidebar-soft);
    border-color: var(--sidebar-line);
    color: var(--accent-strong);
}

.flash,
.error,
.ok,
.bad {
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.flash,
.ok {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.error,
.bad {
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
}

.muted,
.empty {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    min-width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

tbody tr:hover td {
    background: #fbfcfe;
}

tr:last-child td {
    border-bottom: 0;
}

.details {
    display: grid;
    gap: 10px 20px;
    grid-template-columns: 150px minmax(0, 1fr);
    margin: 0;
}

.details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.share-page {
    display: grid;
    gap: 12px;
}

.share-compact-bar {
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
}

.share-file-summary {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.share-file-summary strong {
    color: var(--ink);
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-kicker,
.share-file-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.share-kicker {
    text-transform: uppercase;
}

.share-download-button {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 13px;
}

.preview-panel {
    overflow: hidden;
    padding: 14px;
}

.preview-panel h2 {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.pdf-preview-panel {
    display: grid;
    gap: 10px;
}

.pdf-preview-shell {
    align-items: start;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    justify-items: center;
    overflow: auto;
    padding: 10px;
}

.file-preview-frame {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: min(72vh, 780px);
    margin-top: 14px;
    width: 100%;
}

.file-preview-pdf {
    aspect-ratio: 210 / 297;
    height: min(82vh, 900px);
    margin-top: 0;
    max-width: 760px;
    width: 100%;
}

.file-preview-image {
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%),
        #ffffff;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-size: 20px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    margin-top: 14px;
    max-height: 72vh;
    max-width: 100%;
    object-fit: contain;
}

.box {
    margin-bottom: 14px;
    padding: 16px;
}

code {
    background: #f2f4f7;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    display: inline-block;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 5px;
    white-space: pre-wrap;
}

.internal-notes {
    display: grid;
    gap: 16px;
    margin: 18px 0;
}

.note-list {
    display: grid;
    gap: 10px;
}

.note-item {
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 12px 14px;
}

.note-item p {
    color: #344054;
    margin: 0;
    overflow-wrap: anywhere;
}

.note-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px;
    justify-content: space-between;
}

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

.offer-form-logo {
    display: block;
    height: auto;
    max-height: 58px;
    max-width: 180px;
    object-fit: contain;
}

.offer-lines {
    display: grid;
    gap: 12px;
}

.offer-lines-toolbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 18px 0 10px;
}

.offer-lines-toolbar h2 {
    margin: 0;
}

.offer-lines-toolbar p {
    margin: 4px 0 0;
}

.offer-line-grid {
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 12px;
}

.offer-line-actions {
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 8px;
    grid-column: 1 / -1;
    justify-content: flex-end;
    padding-bottom: 10px;
}

.offer-line-actions strong {
    color: var(--ink);
    font-size: 12px;
    margin-right: auto;
}

.offer-line-actions .button {
    min-height: 34px;
    padding: 7px 10px;
    width: auto;
}

.offer-line-actions button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.offer-line-grid label {
    display: grid;
    gap: 5px;
}

.offer-line-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.catalog-toolbar,
.offer-register-toolbar,
.statistics-toolbar {
    align-items: end;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.catalog-toolbar .filter-actions,
.offer-register-toolbar .filter-actions,
.statistics-toolbar .filter-actions {
    align-items: end;
    display: flex;
    gap: 8px;
}

.catalog-count {
    margin: 12px 0 0;
}

.catalog-status,
.sales-status,
.version-chip {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 6px 9px;
    white-space: nowrap;
}

.catalog-status.is-active,
.sales-status.is-accepted {
    background: #ecfdf3;
    color: #067647;
}

.catalog-status.is-inactive,
.sales-status.is-lost {
    background: #fef3f2;
    color: #b42318;
}

.sales-status.is-pending {
    background: #fffaeb;
    color: #b54708;
}

.version-chip {
    background: var(--accent-soft);
    color: var(--accent-strong);
    margin-left: 4px;
    padding: 4px 6px;
}

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

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 17px;
}

.stat-card span,
.stat-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.stat-card strong {
    color: var(--ink);
    font-size: 30px;
    line-height: 1;
}

.stat-card.sales-accepted {
    border-top: 3px solid #12b76a;
}

.stat-card.sales-pending {
    border-top: 3px solid #f79009;
}

.stat-card.sales-lost {
    border-top: 3px solid #f04438;
}

.stat-card.sales-rate {
    border-top: 3px solid var(--accent);
}

.analytics-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .95fr);
    margin-bottom: 18px;
}

.panel-heading {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.chart-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.chart-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 72px minmax(0, 1fr) 108px;
}

.chart-row > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.chart-row > strong {
    color: var(--ink);
    font-size: 12px;
    text-align: right;
}

.chart-track {
    background: #edf2f7;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.chart-track i {
    background: linear-gradient(90deg, var(--accent), #5b9cff);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.chart-track i.sales-accepted {
    background: #12b76a;
}

.chart-track i.sales-pending {
    background: #f79009;
}

.chart-track i.sales-lost {
    background: #f04438;
}

.outcome-panel {
    margin-bottom: 18px;
}

.offer-status-form,
.inline-form {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.offer-status-form select {
    min-width: 118px;
}

.offer-status-form.stack {
    align-items: stretch;
    display: grid;
    max-width: 620px;
}

.offer-acceptance-fields {
    background: #f7f9fc;
    border: 1px solid #d8e0ea;
    border-radius: 6px;
    display: grid;
    gap: 10px 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
}

.offer-acceptance-fields[hidden] {
    display: none;
}

.offer-acceptance-fields .field-help {
    grid-column: 1 / -1;
}

.invoice-overview {
    border-left: 4px solid #2563eb;
}

.invoice-workspace {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(300px, 1.25fr) repeat(2, minmax(230px, .8fr));
    margin-top: 20px;
}

.invoice-secondary-tools {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.invoice-control-card {
    margin: 0;
    min-width: 0;
}

.invoice-control-card h2 {
    font-size: 18px;
    margin: 7px 0 4px;
}

.invoice-control-card p {
    margin: 0;
}

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

.payment-presets .button {
    justify-content: center;
    width: 100%;
}

.invoice-record-section {
    margin-top: 22px;
}

.invoice-record-section .panel-heading {
    margin-bottom: 10px;
}

.invoice-record-section .panel-heading h2,
.invoice-record-section .panel-heading p {
    margin: 0;
}

.offer-share-banner {
    align-items: center;
    background: #ecfdf3;
    border: 1px solid #abefc6;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    margin-bottom: 16px;
    padding: 12px;
}

.offer-share-banner span {
    color: #067647;
    font-weight: 800;
}

.offer-share-banner input {
    background: #ffffff;
}

.qr-label-actions {
    margin-bottom: 18px;
}

.qr-label-page {
    display: grid;
    justify-content: center;
    padding: 10px 0 26px;
}

.qr-label-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    max-width: 620px;
    padding: 24px;
    width: min(100%, 620px);
}

.qr-label-header {
    border-bottom: 1px solid var(--line-soft);
    display: grid;
    gap: 6px;
    padding-bottom: 14px;
}

.qr-label-header strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.15;
}

.qr-label-header span:last-child {
    color: var(--muted);
}

.qr-label-body {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: 210px minmax(0, 1fr);
}

.qr-code {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    display: block;
    height: 210px;
    padding: 10px;
    width: 210px;
}

.qr-label-target {
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    color: #344054;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    margin: 0;
    overflow-wrap: anywhere;
    padding: 10px 12px;
}

@media print {
    body {
        background: #ffffff;
    }

    .sidebar,
    .workspace-topbar,
    .qr-label-actions {
        display: none;
    }

    .app-shell,
    .workspace-shell,
    .container,
    .content-body {
        display: block;
        margin: 0;
        min-height: 0;
        padding: 0;
        width: 100%;
    }

    .qr-label-page {
        padding: 0;
    }

    .qr-label-card {
        border: 1px solid #111827;
        box-shadow: none;
        break-inside: avoid;
        max-width: none;
        width: 100%;
    }
}

@media (max-width: 1120px) {
    .explorer-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .sidebar {
        min-height: auto;
    }

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

    .nav-divider {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .workspace-shell {
        min-height: auto;
    }

    .grid,
    .cards,
    .explorer-layout,
    .warehouse-filters,
    .user-identity-grid,
    .company-access-controls,
    .stats-grid,
    .analytics-grid,
    .backup-grid,
    .folder-searchbar,
    .share-card,
    .offer-line-grid,
    .offer-share-banner,
    .todo-board,
    .todo-item,
    .todo-summary,
    .todo-summary-meta,
    .todo-main,
    .todo-meta-fields,
    .low-stock-alert,
    .warehouse-reel-row,
    .warehouse-movement-row {
        grid-template-columns: 1fr;
    }

    .invoice-workspace,
    .invoice-secondary-tools {
        grid-template-columns: 1fr;
    }

    .todo-summary::before {
        display: none;
    }

    .todo-title-line,
    .todo-summary-meta {
        grid-column: auto;
    }

    .todo-due {
        text-align: left;
    }

    .todo-dropdown-actions {
        justify-content: start;
    }

    .qr-label-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .folder-create-panel {
        position: static;
    }
}

@media (max-width: 620px) {
    .container {
        padding: 18px;
    }

    .workspace-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 18px;
    }

    .login-logo {
        max-height: 54px;
        max-width: 160px;
        width: min(100%, 160px);
    }

    .side-nav,
    .explorer-filters {
        grid-template-columns: 1fr;
    }

    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .offer-lines-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .offer-acceptance-fields,
    .payment-presets {
        grid-template-columns: 1fr;
    }

    .toolbar,
    .actions,
    .explorer-commandbar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-actions,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-setup-head {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-setup-head > button {
        width: 100%;
    }

    .folder-permission-tools {
        align-items: stretch;
    }

    .folder-permission-tools select,
    .folder-permission-tools button {
        flex: 1 1 180px;
        width: auto;
    }

    button,
    .button {
        width: 100%;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .file-row {
        align-items: start;
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .file-list-head {
        display: none;
    }

    .file-badge,
    .file-actions {
        grid-column: 2;
        justify-content: flex-start;
    }

    .file-actions .button {
        width: auto;
    }

    .offer-line-actions .button {
        width: auto;
    }

    .share-card {
        align-items: stretch;
    }

    .share-compact-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-actions {
        justify-content: flex-start;
    }

    .share-card-meta,
    .share-card-actions {
        justify-content: flex-start;
    }

    .share-card-actions button,
    .warehouse-reel-row .button {
        width: 100%;
    }

    .warehouse-card-actions,
    .warehouse-row-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .qr-code {
        height: min(72vw, 210px);
        width: min(72vw, 210px);
    }
}
.data-date, .data-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-register-table td:nth-child(6), .invoice-register-table td:nth-child(7), .invoice-register-table td:nth-child(8),
.invoice-register-table th:nth-child(6), .invoice-register-table th:nth-child(7), .invoice-register-table th:nth-child(8) { text-align: right; }
.invoice-register-table .invoice-reference { font-weight: 650; overflow-wrap: anywhere; min-width: 10rem; display: inline-block; }
.invoice-register-table .file-badge { white-space: nowrap; }
.file-badge.status-overdue { background: #fff0f0; color: #a92935; border: 1px solid #f2c6cc; }
.file-badge.status-paid { background: #eaf8ee; color: #216b3c; border: 1px solid #c4e7cf; }
.file-badge.status-partial { background: #fff7e5; color: #805918; border: 1px solid #efdbac; }
.file-badge.status-pending, .file-badge.status-draft { background: #f0f2f6; color: #535e70; border: 1px solid #dde2e9; }
.file-badge.status-approved { background: #edf3ff; color: #315bac; border: 1px solid #cadbf8; }
.file-badge.status-cancelled { background: #f3f3f3; color: #69707d; border: 1px solid #dfe2e8; }
.results-pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; color: var(--muted); font-size: 13px; }
.results-pagination p { margin: 0; }
.results-pagination .actions { align-items: center; }
.pagination-disabled { padding: 8px 12px; color: #778295; }
@media (max-width: 720px) {
    .results-pagination { flex-direction: column; align-items: flex-start; }
}
