: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-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;
}

.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;
}

.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-line-grid {
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(170px, 1.7fr) minmax(76px, .75fr) minmax(58px, .55fr) repeat(7, minmax(82px, .75fr));
    padding: 12px;
}

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

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

.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,
    .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;
    }

    .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;
    }

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

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

    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;
    }

    .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);
    }
}
