/* panel — auth, dashboard shell, operations */

/* =========================================================
   forms / auth / dashboard
   ========================================================= */

.stack {
    display: grid;
    gap: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 600;
    font-size: 0.92rem;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

textarea {
    resize: vertical;
    min-height: 84px;
    line-height: 1.5;
}

select {
    appearance: none;
    padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

input::placeholder,
textarea::placeholder {
    color: #a7a197;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.auth-body,
.dash-body {
    min-height: 100vh;
}

.auth-body {
    background: #f6f3ee;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-content: center;
    gap: 28px;
    padding: 40px 20px;
}

.auth-card {
    width: min(400px, 92vw);
    margin: 0;
    padding: 32px 32px 26px;
    border: 0;
    border-top: 2px solid var(--gold);
    box-shadow: var(--shadow-sm);
}

.auth-card h1 {
    font-size: 1.65rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.auth-card .stack {
    margin-top: 24px;
    gap: 18px;
}

.auth-card .btn {
    width: 100%;
    margin-top: 6px;
}

.brand-center {
    display: grid;
    justify-items: center;
}

.brand-center img {
    height: 52px;
}

/* =========================================================
   dashboard shell
   ========================================================= */

.ico {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn .ico {
    width: 18px;
    height: 18px;
}

.btn-block {
    width: 100%;
}

.dash-body {
    display: grid;
    grid-template-columns: 218px minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: var(--navy);
}

.dash-main {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f3f1ec;
    border-radius: 40px 40px 0 0;
}

.dash-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dash-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 10px 26px;
    background: rgba(236, 232, 225, 0.9);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid #dad3c5;
    box-shadow: 0 10px 22px -16px rgba(10, 19, 34, 0.42);
}

.dash-menu {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.dash-crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 1.05rem;
    line-height: 1.1;
}

.dash-crumb span {
    color: var(--ink-soft);
    white-space: nowrap;
}

.dash-crumb .ico {
    width: 14px;
    height: 14px;
    color: var(--ink-soft);
}

.dash-crumb strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1.1;
    font-weight: 600;
    white-space: nowrap;
}

.dash-date .ico {
    width: 16px;
    height: 16px;
    color: var(--gold);
}

.dash-content {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    padding: 22px 26px 44px;
}

.dash-content h1 {
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    letter-spacing: -0.03em;
}

.dash-content h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.dash-content .muted {
    color: var(--ink-soft);
}

.dash-content .card {
    margin: 0;
    padding: 20px;
    border-radius: 16px;
}

.dash-content .alert:first-child {
    margin-top: 0;
}

/* =========================================================
   dashboard components
   ========================================================= */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.stat {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 13px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-left: 5px solid var(--stat-accent, var(--navy));
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-icon,
.card-icon {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #f5efe3;
    color: #9c7d40;
}

.stat-icon {
    grid-row: span 3;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--stat-bg, #eef1f6);
    color: var(--stat-accent, var(--navy));
}

.stat p {
    margin: 0;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.stat strong {
    display: block;
    margin-top: 1px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat strong.stat-text {
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--ok);
}

.stat small {
    display: block;
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 0.77rem;
}

.stat:nth-child(1) {
    --stat-accent: #2b5da8;
    --stat-bg: #e6eefa;
}

.stat:nth-child(2) {
    --stat-accent: #1d6b43;
    --stat-bg: #e1f2e8;
}

.stat:nth-child(3) {
    --stat-accent: #6a45b8;
    --stat-bg: #eee8fa;
}

.stat:nth-child(4) {
    --stat-accent: #a8680f;
    --stat-bg: #fcf1dd;
}

.modules {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.module {
    position: relative;
    padding: 18px;
    border: 1px dashed #dcd5c8;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
}

.module h3 {
    margin: 12px 0 4px;
    font-size: 0.98rem;
}

.module p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.87rem;
    line-height: 1.5;
}

.soon-tag {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f5efe3;
    color: #9c7d40;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.dash-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}

.dash-grid-aside {
    grid-template-columns: minmax(0, 1fr) 320px;
}

.dash-aside {
    display: grid;
    gap: 16px;
    align-content: start;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.card-head p {
    margin: 0;
    font-size: 0.86rem;
}

.card-head .btn {
    flex: none;
}

.head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

/* modal */

.modal {
    width: min(440px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 30px 70px -20px rgba(10, 19, 34, 0.45);
}

.modal[open] {
    display: flex;
    flex-direction: column;
    animation: modal-in 0.22s var(--ease);
}

.modal>form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.modal::backdrop {
    background: rgba(10, 19, 34, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

.modal-head {
    flex: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(236, 232, 225, 0.9);
    border-bottom: 1px solid #dad3c5;
}

.modal-head div {
    flex: 1;
}

.modal-head h2 {
    margin: 0 0 2px;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.modal-head p {
    margin: 0;
    font-size: 0.86rem;
}

.modal-close {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 2px 6px -2px rgba(10, 19, 34, 0.18);
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.modal-close:hover {
    background: #f1ede4;
    border-color: #c8c0b0;
    color: var(--ink);
    transform: scale(1.05);
}

.modal-close .ico {
    width: 20px;
    height: 20px;
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 20px;
}

.modal-foot {
    flex: none;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 20px;
    border-top: 1px solid var(--line-soft);
    background: #faf9f6;
}

.count {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 22px;
    margin-left: 6px;
    padding: 0 8px;
    border-radius: 999px;
    background: #f1ede4;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0;
    vertical-align: 2px;
}

.field-hint {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 400;
}

.search {
    position: relative;
    display: flex;
    align-items: center;
    flex: none;
}

.search .ico {
    position: absolute;
    left: 13px;
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
}

.search input {
    width: 230px;
    padding: 10px 14px 10px 38px;
    border-radius: 999px;
    background: #faf9f6;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
}

.data-table th,
.data-table td {
    padding: 13px 16px;
    white-space: nowrap;
    vertical-align: middle;
}

.data-table th {
    background: #faf8f4;
    font-size: 0.72rem;
    font-weight: 700;
}

.data-table tbody tr {
    transition: background 0.15s var(--ease);
}

.data-table tbody tr:hover {
    background: #fcfbf8;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.person {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.person .avatar {
    width: 34px;
    height: 34px;
    font-size: 0.84rem;
}

.person span:not(.avatar) {
    display: grid;
    line-height: 1.25;
}

.person strong {
    font-size: 0.92rem;
}

.person small {
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #efece6;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.badge-admin {
    background: var(--navy);
    color: #fff;
}

.badge-sub_admin {
    background: #e6ebf3;
    color: var(--navy-lift);
}

.badge-user {
    background: #f5ecd8;
    color: #7a5d24;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
}

.status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b9b2a6;
}

.status.is-on {
    color: var(--ok);
}

.status.is-on::before {
    background: #2f9e63;
    box-shadow: 0 0 0 3px rgba(47, 158, 99, 0.16);
}

.empty {
    display: grid;
    justify-items: center;
    padding: 40px 16px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    text-align: center;
    color: var(--ink-soft);
}

.empty .ico {
    width: 36px;
    height: 36px;
    color: #c9bfa9;
}

.empty p {
    margin: 10px 0 0;
}

.empty-filter {
    margin: 0;
    padding: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feed li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
}

.feed li:first-child {
    padding-top: 0;
}

.feed li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.feed div {
    display: grid;
    line-height: 1.3;
}

.feed strong {
    font-size: 0.92rem;
}

.feed small {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.dash-content .card-navy {
    border-color: var(--navy);
    background:
        radial-gradient(90% 80% at 100% 0%, rgba(187, 154, 90, 0.18), transparent 60%),
        var(--navy);
    color: #fff;
}

.card-navy h2 {
    color: #fff;
}

.quick-links {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.quick-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.quick-links a>.ico:first-child {
    color: var(--gold-lift);
}

.quick-links span {
    flex: 1;
    display: grid;
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.3;
}

.quick-links small {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    font-weight: 500;
}

.quick-links a>.ico:last-child {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.quick-links a:hover {
    border-color: rgba(205, 171, 104, 0.4);
    background: rgba(187, 154, 90, 0.12);
    color: #fff;
}

.quick-links a:hover>.ico:last-child {
    opacity: 1;
    transform: translateX(3px);
}

/* =========================================================
   operations: mal kabul + stok
   ========================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.req {
    color: var(--gold);
}

.is-upper {
    text-transform: uppercase;
}

.is-upper::placeholder {
    text-transform: none;
}

.dash-content .section-gap {
    margin-top: 16px;
}

.dash-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 16px 8px 12px;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
    box-shadow: var(--shadow-xs);
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.back-link:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.back-link .ico {
    width: 18px;
    height: 18px;
    transition: transform 0.2s var(--ease);
}

.back-link:hover .ico {
    transform: translateX(-3px);
}

.back-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.back-row .back-link {
    margin-bottom: 0;
}

@media (max-width: 720px) {
    .back-row .btn {
        padding: 8px 8px;
        gap: 6px;
    }

    .card-head .head-actions .btn {
        width: auto;
    }
}

.stats-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

a.stat {
    color: inherit;
}

.stat-clickable:hover {
    border-color: rgba(187, 154, 90, 0.5);
    color: inherit;
}

.stat-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.55;
    color: var(--navy);
}

.stat-link .ico {
    width: 16px;
    height: 16px;
    color: var(--gold);
    transition: transform 0.2s var(--ease);
}

.stat-link:hover .ico {
    transform: translateX(3px);
}

a.module.is-live {
    border-style: solid;
    border-color: var(--line-soft);
    background: var(--surface);
    color: inherit;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

a.module.is-live:hover {
    border-color: rgba(187, 154, 90, 0.5);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.module-go {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
}

.module-go .ico {
    width: 18px;
    height: 18px;
    stroke-width: 2.45;
}

/* status colors */

.badge-expected,
.status-card-expected {
    --st: #a8680f;
    --st-bg: #fcf1dd;
}

.badge-counting,
.status-card-counting {
    --st: #2b5da8;
    --st-bg: #e6eefa;
}

.badge-reviewing,
.status-card-reviewing {
    --st: #6a45b8;
    --st-bg: #eee8fa;
}

.badge-approved,
.status-card-approved {
    --st: #1d6b43;
    --st-bg: #e1f2e8;
}

.badge-expected,
.badge-counting,
.badge-reviewing,
.badge-approved {
    gap: 6px;
    background: var(--st-bg);
    color: var(--st);
}

.badge-expected::before,
.badge-counting::before,
.badge-reviewing::before,
.badge-approved::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-lg {
    padding: 7px 14px;
    font-size: 0.84rem;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--st);
    border-radius: 14px;
    background: var(--surface);
}

.status-card-dot {
    width: 10px;
    height: 10px;
    flex: none;
    border-radius: 50%;
    background: var(--st);
    box-shadow: 0 0 0 4px var(--st-bg);
}

.status-card strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;
}

.status-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

/* tables */

.data-table .num {
    text-align: right;
}

.data-table .cell-wrap {
    min-width: 180px;
    max-width: 340px;
    white-space: normal;
}

.data-table .cell-action {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.data-table .cell-download {
    width: 1%;
    text-align: left;
    white-space: nowrap;
}

.data-table .cell-action .icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    height: 36px;
    padding: 0 12px;
    border-color: #cfc6b6;
    background: #fff;
    color: var(--navy);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
}

.data-table .cell-action .icon-btn .ico {
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}

.data-table .cell-action .icon-btn:hover {
    border-color: var(--navy);
    background: #f7f5f1;
}

.data-table .cell-action .icon-btn[aria-label="İndir"] {
    border-color: #e4d3a4;
    background: #fbf6ea;
    color: #8a6420;
}

.data-table .cell-action .icon-btn[aria-label="İndir"]:hover {
    border-color: #c4a15a;
    background: #f6edd6;
    color: #6d4e12;
}

.data-table .cell-action .icon-btn[aria-label="İncele"] {
    border-color: #c5d4ea;
    background: #f3f7fc;
    color: #2b5da8;
}

.data-table .cell-action .icon-btn[aria-label="İncele"]:hover {
    border-color: #8eadd4;
    background: #e7f0fa;
    color: #1e467f;
}

.data-table .cell-action .icon-btn+.icon-btn {
    margin-left: 4px;
}

.data-table tfoot td {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: #faf8f4;
}

.cell-sub {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
}

.ref {
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.01em;
}

.ref:hover {
    color: var(--gold);
}

.sku {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 7px;
    background: #f1ede4;
    color: var(--ink-soft);
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

a.sku:hover {
    background: var(--navy);
    color: #fff;
}

.qty {
    display: inline-block;
    min-width: 44px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef6f1;
    color: var(--ok);
    font-weight: 800;
    text-align: center;
}

.qty.is-zero {
    background: #f6ecec;
    color: var(--danger);
}

.qty.is-partial {
    background: #fcf1dd;
    color: #a8680f;
}

.delta-up {
    color: var(--ok);
}

.delta-down {
    color: var(--danger);
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.icon-btn .ico {
    width: 17px;
    height: 17px;
}

.icon-btn:hover {
    border-color: var(--navy);
    background: var(--navy);
    color: #fff;
}

.icon-btn-danger:hover {
    border-color: #e6b9b9;
    background: #fbeaea;
    color: var(--danger);
}

.head-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.head-tools form {
    display: flex;
    gap: 8px;
}

.head-tools select,
.status-select {
    width: auto;
    min-width: 170px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-radius: 999px;
    font-size: 0.88rem;
}

/* tabs */

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface);
    scrollbar-width: none;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 650;
    white-space: nowrap;
}

.tab span {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f1ede4;
    color: var(--ink-soft);
    font-size: 1rem;
    text-align: center;
}

.tab:hover {
    background: #f7f5f1;
    color: var(--ink);
}

.tab-push {
    margin-left: auto;
}

.tab.is-active {
    background: var(--navy);
    color: #fff;
}

.tab.is-active span {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.status-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-select {
    min-width: 160px;
    font-weight: 650;
}

.status-select-expected {
    border-color: #efd7a8;
    background-color: #fcf1dd;
    color: #a8680f;
}

.status-select-counting {
    border-color: #c4d5f0;
    background-color: #e6eefa;
    color: #2b5da8;
}

.status-select-reviewing {
    border-color: #d6c9f2;
    background-color: #eee8fa;
    color: #6a45b8;
}

.status-select-approved {
    border-color: #b9dfc9;
    background-color: #e1f2e8;
    color: #1d6b43;
}

.status-select-entered {
    border-color: #d6c9f2;
    background-color: #eee8fa;
    color: #6a45b8;
}

.status-select-preparing {
    border-color: #efd7a8;
    background-color: #fcf1dd;
    color: #a8680f;
}

.status-select-shipped {
    border-color: #b9dfc9;
    background-color: #e1f2e8;
    color: #1d6b43;
}

/* receipt form */

.form-sections {
    display: grid;
    gap: 0;
}

.dash-content .form-sections {
    padding: 0;
}

.form-section {
    padding: 20px;
    border-bottom: 1px solid var(--line-soft);
}

.form-section>header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #ece3cf;
    border-left: 3px solid var(--gold);
    border-radius: 12px;
    background: #faf6ec;
}

.form-section>header h2 {
    margin: 0;
}

.section-help {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.help-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    border: 1px solid var(--navy);
    border-radius: 999px;
    padding: 8px 16px 8px 10px;
    background: var(--navy);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.help-btn .ico {
    width: 22px;
    height: 22px;
    stroke-width: 2.4;
}

.help-btn:hover {
    background: #16233a;
}

.modal.modal-wide {
    width: min(860px, calc(100% - 32px));
}

.form-section>header p {
    margin: 0;
    font-size: 0.86rem;
}

.form-step {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold-lift);
    font-size: 0.82rem;
    font-weight: 800;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.field-full {
    grid-column: 1 / -1;
}

.line-head,
.line-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 110px 38px;
    gap: 8px;
    align-items: center;
}

.line-head {
    padding: 0 2px 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.line-rows {
    display: grid;
    gap: 8px;
}

.line-row input {
    padding: 10px 12px;
}

.line-row .icon-btn {
    width: 38px;
    height: 38px;
}

.line-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.line-totals {
    display: flex;
    align-items: center;
    gap: 18px;
}

.line-foot p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.line-foot strong {
    color: var(--ink);
    font-size: 1.1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-radius: 0 0 16px 16px;
    background: #faf9f6;
}

.process-list {
    list-style: none;
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.process-list li {
    display: flex;
    gap: 12px;
}

.process-list li>span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 50%;
    background: #f5efe3;
    color: #9c7d40;
    font-size: 0.8rem;
    font-weight: 800;
}

.process-list div {
    display: grid;
    line-height: 1.35;
}

.process-list strong {
    font-size: 0.9rem;
}

.process-list small {
    color: var(--muted);
    font-size: 0.8rem;
}

.card-navy-text {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
}

/* receipt detail */

.dash-content .receipt-head {
    margin-bottom: 16px;
}

.receipt-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.receipt-title>div {
    flex: 1;
    min-width: 200px;
}

.dash-content .receipt-title h1 {
    margin: 0 0 2px;
    font-size: 1.35rem;
}

.receipt-title p {
    margin: 0;
    font-size: 0.86rem;
}

.receipt-status-text {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #edf2fb;
    color: #1f3f73;
    font-size: 0.9rem;
    font-weight: 600;
}

.receipt-status-text .ico {
    color: #2b5da8;
}

.receipt-status-text.is-final {
    background: #e6f4ec;
    color: #185c38;
}

.receipt-status-text.is-final .ico {
    color: #1f8a53;
}

.steps {
    --step-done: #1f9d5c;
    --step-now: #2b5da8;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 22px 0 0;
    padding: 0;
}

.steps-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 18px;
}

.steps-row .steps {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.tracking-inline {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin: 0 0 0 auto;
    flex-shrink: 0;
}

.tracking-inline label {
    display: grid;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--muted);
}

.tracking-inline input {
    width: 190px;
    padding: 8px 10px;
}

.tracking-hint {
    margin: 0 0 0 auto;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.step::after {
    content: "";
    position: absolute;
    top: 17px;
    left: calc(50% + 26px);
    right: calc(-50% + 26px);
    height: 4px;
    border-radius: 4px;
    background: #e4e0d8;
}

.step:last-child::after {
    display: none;
}

.step.is-done::after {
    background: var(--step-done);
}

.step-dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 2px solid #d4cec3;
    border-radius: 50%;
    background: #fff;
    color: #8a8478;
    font-size: 0.9rem;
    font-weight: 800;
}

.step-dot .ico {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.step.is-done .step-dot,
.step.is-final .step-dot {
    border-color: var(--step-done);
    background: var(--step-done);
    color: #fff;
}

.step.is-current:not(.is-final) .step-dot {
    border-color: var(--step-now);
    background: var(--step-now);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(43, 93, 168, 0.16);
}

.step-text {
    display: grid;
    line-height: 1.3;
}

.step-text strong {
    font-size: 0.9rem;
}

.step-text small {
    color: var(--muted);
    font-size: 0.76rem;
}

.step.is-done .step-text small,
.step.is-final .step-text small {
    color: #1d7a4a;
    font-weight: 600;
}

.step.is-current:not(.is-final) .step-text small {
    color: var(--step-now);
    font-weight: 600;
}

.step:not(.is-done):not(.is-current) .step-text strong {
    color: var(--muted);
    font-weight: 600;
}

.callout {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #efd7a8;
    border-radius: 14px;
    background: #fdf7ea;
}

.callout>.ico {
    color: #a8680f;
}

.callout strong {
    font-size: 0.9rem;
}

.callout p {
    margin: 2px 0 0;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.callout-muted {
    margin-bottom: 0;
    border-color: var(--line);
    background: #faf9f6;
}

.callout-muted>.ico {
    color: var(--muted);
}

.detail-text {
    margin: 0 0 14px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.detail-list {
    display: grid;
    margin: 0;
}

.detail-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.88rem;
}

.detail-list div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
    font-weight: 650;
    text-align: right;
}

.status-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.status-option {
    display: block;
    cursor: pointer;
}

.status-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-option span {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 650;
    text-align: center;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.status-option:hover span {
    border-color: var(--gold);
}

.status-option input:focus-visible+span {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.status-option-expected input:checked+span {
    border-color: #a8680f;
    background: #fcf1dd;
    color: #a8680f;
}

.status-option-counting input:checked+span {
    border-color: #2b5da8;
    background: #e6eefa;
    color: #2b5da8;
}

.status-option-reviewing input:checked+span {
    border-color: #6a45b8;
    background: #eee8fa;
    color: #6a45b8;
}

.status-option-approved input:checked+span {
    border-color: #1d6b43;
    background: #e1f2e8;
    color: #1d6b43;
}

.stock-add-head,
.stock-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.7fr) 148px 64px 96px 72px 88px;
    gap: 8px;
    align-items: center;
}

.stock-add-row .btn {
    width: 100%;
}

.pallet-capacity {
    color: var(--ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.stock-measure {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
}

.stock-add-row .stock-measure input {
    min-width: 0;
    padding: 9px 6px;
    text-align: center;
    font-size: 0.82rem;
}

.stock-add-head {
    padding: 0 2px 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stock-add-head span {
    min-width: 0;
    overflow: hidden;
    line-height: 1.25;
    white-space: normal;
}

.stock-add-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
}

.stock-add-row input {
    padding: 9px 11px;
    font-size: 0.9rem;
}

.stock-add-row.is-complete input {
    background: #f7faf8;
}

.stock-add-row.is-extra {
    margin-top: 4px;
    border-bottom: 0;
}

.subhead {
    margin: 22px 0 10px;
    font-size: 0.95rem;
}

.big-qty {
    display: grid;
    padding: 10px 18px;
    border-radius: 14px;
    background: #eef6f1;
    text-align: center;
    line-height: 1.2;
}

.big-qty strong {
    color: var(--ok);
    font-size: 1.6rem;
    font-weight: 800;
}

.big-qty small {
    color: var(--muted);
    font-size: 0.76rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 13px 8px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.94rem;
}

th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.dash-html {
    font-size: 106.25%;
}

.dash-body {
    --muted: #4b5566;
    --line: #d6cfc2;
    --line-soft: #e6e1d7;
    --input-line: #c9c1b3;
    color: #0f1826;
    line-height: 1.55;
}

.dash-content label {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
}

.dash-body input[type="text"],
.dash-body input[type="password"],
.dash-body input[type="search"],
.dash-body input[type="number"],
.dash-body input[type="date"],
.dash-body input[type="tel"],
.dash-body select,
.dash-body textarea {
    min-height: 44px;
    border: 1.5px solid var(--input-line);
    border-radius: 10px;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 2px rgba(16, 26, 43, 0.05);
}

.dash-body input:hover,
.dash-body select:hover,
.dash-body textarea:hover {
    border-color: #a99f8e;
}

.dash-body input:focus,
.dash-body select:focus,
.dash-body textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(187, 154, 90, 0.25);
}

.dash-body input::placeholder,
.dash-body textarea::placeholder {
    color: #8d8679;
}

.dash-body .btn {
    min-height: 42px;
    font-size: 0.92rem;
}

.dash-body .btn:focus-visible,
.dash-body .icon-btn:focus-visible,
.dash-body .tab:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.dash-content .card,
.dash-body .stat,
.dash-body .status-card {
    border-color: var(--line);
    box-shadow: 0 1px 2px rgba(16, 26, 43, 0.05), 0 4px 14px -8px rgba(16, 26, 43, 0.14);
}

.dash-content h2 {
    font-size: 1.12rem;
}

.dash-content .card-head p,
.dash-content .muted {
    color: var(--muted);
}

.dash-body .data-table th {
    color: #3d4757;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    border-bottom: 1.5px solid var(--line);
}

.dash-body .data-table td {
    font-size: 0.93rem;
    border-bottom-color: var(--line-soft);
}

.dash-body .data-table tbody tr:hover {
    background: #f8f5ee;
}

.dash-body .badge {
    font-size: 0.8rem;
}

.dash-body .field-hint {
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 1200px) {

    .stats,
    .modules,
    .status-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-grid-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .dash-body {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        min-height: 100vh;
        overflow: visible;
        background: #f3f1ec;
    }

    .dash-main {
        height: auto;
        overflow: visible;
        border-radius: 0;
    }

    .dash-scroll {
        overflow: visible;
    }

    .dash-menu {
        display: grid;
    }
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .dash-header {
        padding: 10px 14px;
    }

    .dash-date {
        display: none;
    }

    .dash-content {
        padding: 16px 14px 32px;
    }

    .stats {
        gap: 10px;
    }

    .stat {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .stat-icon {
        grid-row: auto;
        width: 38px;
        height: 38px;
        margin-bottom: 8px;
    }

    .stat strong {
        font-size: 1.35rem;
    }

    .modules,
    .dash-aside,
    .dash-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .dash-content .card {
        padding: 16px 14px;
    }

    .card-head .btn {
        width: 100%;
    }

    .stats-3,
    .field-grid,
    .status-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .line-head,
    .stock-add-head {
        display: none;
    }

    .line-row {
        grid-template-columns: minmax(0, 1fr) 90px 38px;
        padding-bottom: 8px;
        border-bottom: 1px dashed var(--line);
    }

    .line-row input:first-child {
        grid-column: 1 / -1;
    }

    .stock-add-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .stock-add-row input[name="name"],
    .stock-add-row .stock-measure,
    .stock-add-row .btn {
        grid-column: 1 / -1;
    }

    .dash-content .form-sections {
        padding: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .form-section {
        padding: 16px 14px;
    }

    .steps-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .tracking-inline {
        margin: 0;
    }

    .tracking-inline label {
        flex: 1;
    }

    .tracking-inline input {
        width: 100%;
    }

    .steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .step {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .step::after {
        display: none;
    }

    .head-tools,
    .head-tools form {
        width: 100%;
        flex-wrap: wrap;
    }

    .head-tools select {
        flex: 1 1 140px;
        min-width: 0;
    }

    .form-actions .btn {
        flex: 1;
    }

    .modal-foot .btn {
        flex: 1;
    }

    .card-head {
        flex-wrap: wrap;
    }

    .search,
    .search input {
        width: 100%;
    }

}

.badge-entered,
.status-card-entered {
    --st: #6a45b8;
    --st-bg: #eee8fa;
}

.badge-preparing,
.status-card-preparing {
    --st: #a8680f;
    --st-bg: #fcf1dd;
}

.badge-shipped,
.status-card-shipped {
    --st: #1d6b43;
    --st-bg: #e1f2e8;
}

.badge-cancelled,
.status-card-cancelled {
    --st: #8a2b2b;
    --st-bg: #f8e8e8;
}

.badge-entered,
.badge-preparing,
.badge-shipped,
.badge-cancelled {
    gap: 6px;
    background: var(--st-bg);
    color: var(--st);
}

.badge-entered::before,
.badge-preparing::before,
.badge-shipped::before,
.badge-cancelled::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

a.status-card {
    color: inherit;
    text-decoration: none;
}

.choice-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.choice-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink-soft);
    border-radius: 999px;
    padding: 9px 16px;
    font: inherit;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
}

.choice-chip .ico {
    width: 18px;
    height: 18px;
}

.choice-chip.is-on {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.suggest {
    position: relative;
}

.suggest-list {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    top: calc(100% - 8px);
    display: grid;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.suggest-list button {
    appearance: none;
    display: grid;
    gap: 2px;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 12px 14px;
    cursor: pointer;
    color: var(--ink);
    font: inherit;
}

.suggest-list button:last-child {
    border-bottom: 0;
}

.suggest-list button:hover,
.suggest-list button:focus {
    background: var(--line-soft);
}

.suggest-list small {
    color: var(--muted);
}

.recipient,
.history-block {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.recipient p,
.history-block ul {
    margin: 6px 0 0;
}

.history-block+.history-block {
    margin-top: 10px;
}

.history-block header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.history-block li {
    margin-top: 6px;
}

.new-recipient {
    margin-top: 14px;
}

.new-recipient .field-grid {
    margin-top: 14px;
}

.customer-create {
    padding: 0 22px 22px;
}

.qty-input {
    width: 88px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
}

.split-info {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    margin-top: 8px;
}

.split-info h3 {
    margin-bottom: 8px;
}

.split-info p {
    margin: 0 0 4px;
}

@media (max-width: 800px) {
    .split-info {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------- finans */

.dash-body .badge-invoice-draft {
    background: #eef1f6;
    color: #4a5568;
}

.dash-body .badge-invoice-issued {
    background: #fdf3e2;
    color: #8a6124;
}

.dash-body .badge-invoice-paid {
    background: #e8f6ee;
    color: #1f6b43;
}

.dash-body .badge-invoice-void {
    background: #f6eaea;
    color: #8c3a3a;
}

.badge-invoice-draft::before,
.badge-invoice-issued::before,
.badge-invoice-paid::before,
.badge-invoice-void::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.invoice-lines {
    display: flex;
    flex-direction: column;
    border: 1px solid #ece8e0;
    border-radius: 12px;
    overflow: hidden;
}

.invoice-line+.invoice-line {
    border-top: 1px solid #ece8e0;
}

.invoice-line>summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 110px 150px 28px;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    transition: background .15s ease;
}

.invoice-line>summary::-webkit-details-marker {
    display: none;
}

.invoice-line>summary:hover {
    background: #fbf9f6;
}

.invoice-line[data-empty="1"]>summary {
    cursor: default;
}

.invoice-line-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.invoice-line-head strong {
    font-size: .95rem;
    color: #101a2b;
}

.invoice-line-head small {
    font-size: .76rem;
    line-height: 1.45;
    color: #5f6b7c;
}

.invoice-line-figure {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.invoice-line-figure em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-size: .88rem;
    color: #2b3647;
}

.invoice-line-figure small {
    font-size: .7rem;
    color: #8b94a3;
}

.invoice-line-amount {
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #101a2b;
}

.invoice-line-toggle {
    display: flex;
    justify-content: center;
    color: #9aa3b1;
}

.invoice-line-toggle .ico {
    transition: transform .18s ease;
}

.invoice-line[open]>summary {
    background: #fbf9f6;
}

.invoice-line[open] .invoice-line-toggle .ico {
    transform: rotate(90deg);
}

.invoice-line-body {
    padding: 4px 16px 18px;
    border-top: 1px dashed #ece8e0;
    background: #fdfcfa;
}

.invoice-why {
    display: flex;
    gap: 10px;
    margin: 14px 0;
    font-size: .8rem;
    line-height: 1.55;
    color: #5f6b7c;
}

.invoice-why .ico {
    flex: none;
    color: #bb9a5a;
}

.charge-table .calc-note,
.data-table .calc-note {
    display: block;
    margin-top: 4px;
    font-size: .72rem;
    line-height: 1.5;
    color: #76808f;
}

.data-table .nowrap {
    white-space: nowrap;
}

.invoice-totals {
    margin: 20px 0 0;
    margin-left: auto;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.invoice-totals div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 14px;
    border-radius: 8px;
}

.invoice-totals dt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .85rem;
    color: #5f6b7c;
}

.invoice-totals dt small {
    font-size: .72rem;
    color: #8b94a3;
}

.invoice-totals dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #2b3647;
}

.invoice-totals .is-total {
    background: #f6f3ed;
}

.invoice-totals .is-total dt {
    font-weight: 700;
    color: #101a2b;
}

.invoice-totals .is-total dd {
    font-size: 1.05rem;
    font-weight: 700;
    color: #101a2b;
}

.rate-block+.rate-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #ece8e0;
}

.rate-block>header {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.rate-block>header strong {
    font-size: .9rem;
    color: #101a2b;
}

.rate-block>header small {
    font-size: .74rem;
    line-height: 1.5;
    color: #8b94a3;
}

.rate-block ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rate-block li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: .82rem;
    color: #5f6b7c;
}

.rate-block li+li {
    border-top: 1px dashed #f0ece4;
}

.rate-block li em {
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
    color: #2b3647;
}

.line-head.rate-head,
.line-row.rate-row {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) 40px;
}

.rate-row .input-affix {
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.rate-row .input-affix:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.rate-row .input-affix input {
    width: auto;
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

.rate-row .input-affix em {
    flex: none;
    padding-right: 10px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.rate-row .input-affix.is-fixed {
    background: #f7f5f1;
}

.rate-row .input-affix.is-fixed input {
    color: var(--muted);
}

@media (max-width: 1100px) {
    .invoice-line>summary {
        grid-template-columns: minmax(0, 1fr) 130px 28px;
    }

    .invoice-line-figure {
        display: none;
    }
}

@media (max-width: 900px) {
    .line-head.rate-head {
        display: none;
    }

    .line-row.rate-row {
        grid-template-columns: 1fr 1fr;
    }

    .invoice-totals {
        max-width: none;
    }
}