* {
    box-sizing: border-box;
}

:root {
    --red: #e60012;
    --red-dark: #c90010;
    --red-soft: #fff1f3;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e9edf3;
    --canvas: #f7f9fc;
    --surface: #ffffff;
    --green: #2ab673;
    --green-soft: #effaf5;
    --blue: #2878d4;
    --blue-soft: #edf5ff;
    --warning: #d97706;
    --shadow: 0 10px 28px rgba(20, 30, 50, 0.07);
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--ink);
    background: var(--canvas);
    font-family: "Segoe UI", Arial, sans-serif;
}

a {
    color: inherit;
}

svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.oneflow-logo,
.login-logo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--red);
}

.oneflow-logo strong,
.login-logo strong {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.055em;
}

.oneflow-ring {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: conic-gradient(var(--red) 0 72%, #161b25 72% 90%, #d8dce4 90% 100%);
}

.oneflow-ring::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #fff;
}

.oneflow-ring.large {
    width: 52px;
    height: 52px;
}

.oneflow-ring.large::after {
    inset: 14px;
}

.brand-divider {
    width: 1px;
    height: 34px;
    background: var(--line);
}

.brand-description {
    display: grid;
    gap: 4px;
}

.brand-description strong {
    font-size: 11px;
    font-weight: 650;
}

.brand-description small {
    color: var(--muted);
    font-size: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-icon-button {
    position: relative;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0;
    color: #3d4655;
    background: transparent;
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: 1px;
    right: 0;
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: var(--red);
    font-size: 9px;
    font-weight: 800;
}

.header-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
}

.header-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ffb2b8, #ef6e79);
    font-size: 11px;
    font-weight: 800;
}

.header-user-copy {
    display: grid;
    gap: 2px;
}

.header-user-copy strong {
    font-size: 11px;
}

.header-user-copy small {
    color: var(--muted);
    font-size: 9px;
}

.chevron {
    color: var(--muted);
    font-size: 14px;
}

.logout-hidden-link {
    position: absolute;
    inset: 100% 0 auto auto;
    min-width: 90px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--red);
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: 160ms ease;
}

.header-user:hover .logout-hidden-link {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(8px);
}

/* Layout and sidebar */
.app-layout {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    min-height: calc(100vh - 104px);
}

.side-nav {
    border-right: 1px solid var(--line);
    background: #fff;
}

.side-nav nav {
    position: sticky;
    top: 72px;
    display: grid;
    gap: 6px;
    padding: 16px 10px;
}

.side-link {
    display: grid;
    grid-template-columns: 25px 1fr;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 7px 8px;
    border-radius: 9px;
    color: #4d5665;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
}

.side-link:hover,
.side-link.active {
    color: var(--red);
    background: var(--red-soft);
}

.side-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
}

.side-icon svg {
    width: 17px;
    height: 17px;
}

.page-content {
    min-width: 0;
    padding: 26px 22px 32px;
}

.app-footer {
    padding: 13px 22px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: #fff;
    font-size: 9px;
    text-align: center;
}

/* Dashboard */
.dashboard-greeting {
    margin-bottom: 22px;
}

.dashboard-greeting h1 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.035em;
}

.dashboard-greeting h1 span {
    color: var(--red);
}

.dashboard-greeting p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.locked-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.locked-module-card {
    position: relative;
    min-height: 285px;
    overflow: hidden;
    padding: 20px 18px 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow);
}

.module-card-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.module-visual-icon {
    display: grid;
    flex: 0 0 auto;
    width: 47px;
    height: 47px;
    place-items: center;
    border-radius: 13px;
    color: var(--red);
    background: linear-gradient(135deg, #fff1f3, #ffe4e8);
}

.module-visual-icon svg {
    width: 29px;
    height: 29px;
    stroke-width: 1.75;
}

.module-card-top h2 {
    margin: 5px 0 5px;
    font-size: 14px;
    letter-spacing: -0.02em;
}

.module-card-top p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.development-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 7px;
    padding: 4px 7px;
    border-radius: 6px;
    color: #4775ad;
    background: #edf4ff;
    font-size: 8px;
    font-weight: 700;
}

.open-module-button {
    position: absolute;
    left: 18px;
    bottom: 15px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    padding: 0 12px;
    border-radius: 5px;
    color: #fff;
    background: var(--red);
    box-shadow: 0 7px 16px rgba(230, 0, 18, 0.2);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.open-module-button:hover {
    background: var(--red-dark);
}

.card-illustration {
    position: absolute;
    inset: auto 0 0 0;
    height: 125px;
    opacity: 0.65;
}

.invoice-illustration {
    background:
        radial-gradient(circle at 72% 36%, rgba(230,0,18,.1), transparent 30%),
        linear-gradient(165deg, transparent 0 45%, rgba(230,0,18,.08) 46% 47%, transparent 48%);
}

.chart-bar {
    position: absolute;
    bottom: 20px;
    width: 16px;
    border-radius: 5px 5px 0 0;
    background: linear-gradient(180deg, rgba(230,0,18,.35), rgba(230,0,18,.06));
}

.chart-bar.b1 { right: 62px; height: 32px; }
.chart-bar.b2 { right: 40px; height: 55px; }
.chart-bar.b3 { right: 18px; height: 80px; }

.chart-line {
    position: absolute;
    left: -20px;
    right: 30px;
    bottom: 30px;
    height: 70px;
    border-top: 2px solid rgba(230,0,18,.2);
    border-radius: 50%;
    transform: rotate(-10deg);
}

.kpi-quick-stack {
    position: relative;
    z-index: 3;
    display: grid;
    gap: 7px;
    margin: 15px 0 0 2px;
}

.kpi-quick-stack a {
    display: grid;
    grid-template-columns: 27px 1fr auto;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255,255,255,.88);
    text-decoration: none;
}

.kpi-quick-stack a:hover {
    border-color: rgba(230, 0, 18, 0.22);
    box-shadow: 0 5px 12px rgba(20, 30, 50, 0.06);
}

.kpi-quick-stack a > span:nth-child(2) {
    display: grid;
    gap: 2px;
}

.kpi-quick-stack strong {
    font-size: 10px;
}

.kpi-quick-stack small {
    color: var(--muted);
    font-size: 8px;
}

.kpi-quick-stack b {
    color: var(--muted);
    font-size: 16px;
}

.mini-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
}

.ring-mini {
    border: 5px solid var(--red);
    border-top-color: #f6a1aa;
    border-radius: 50%;
}

.bars-mini,
.bars-small,
.bars-heading {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}

.bars-mini i,
.bars-small i,
.bars-heading i {
    display: block;
    width: 4px;
    border-radius: 3px 3px 0 0;
    background: var(--red);
}

.bars-mini i:nth-child(1) { height: 9px; }
.bars-mini i:nth-child(2) { height: 15px; }
.bars-mini i:nth-child(3) { height: 21px; }

.kpi-illustration {
    right: -20px;
    bottom: 0;
    left: auto;
    width: 180px;
    background: linear-gradient(165deg, transparent 0 45%, rgba(230,0,18,.08) 46% 47%, transparent 48%);
}

.trend-line {
    position: absolute;
    inset: 35px 5px auto 10px;
    height: 55px;
    border-top: 2px solid rgba(230,0,18,.18);
    border-radius: 50%;
    transform: rotate(8deg);
}

.trend-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(230,0,18,.32);
}

.trend-dot.d1 { left: 40px; top: 50px; }
.trend-dot.d2 { left: 95px; top: 32px; }
.trend-dot.d3 { left: 145px; top: 48px; }

.server-illustration {
    position: absolute;
    right: 10px;
    bottom: 35px;
    width: 180px;
    height: 150px;
    opacity: .28;
}

.server-tower {
    position: absolute;
    bottom: 24px;
    width: 42px;
    border: 1px solid #5f89bd;
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(70,120,180,.12), rgba(70,120,180,.02));
    box-shadow: inset 0 -10px 0 rgba(70,120,180,.05);
}

.server-tower::before,
.server-tower::after {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    height: 1px;
    background: #5f89bd;
    box-shadow: 0 10px 0 #5f89bd, 0 20px 0 #5f89bd, 0 30px 0 #5f89bd;
}

.server-tower::before { top: 15px; }
.server-tower::after { top: 20px; }

.server-tower.t1 { left: 10px; height: 80px; }
.server-tower.t2 { left: 66px; height: 112px; }
.server-tower.t3 { left: 122px; height: 95px; }

.server-floor {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 15px;
    height: 10px;
    border: 1px solid #5f89bd;
    transform: skewX(-25deg);
}

.dashboard-lower-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr .9fr;
    gap: 14px;
    margin-top: 18px;
}

.dashboard-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(20, 30, 50, 0.045);
}

.dashboard-panel > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 43px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
}

.dashboard-panel > header a {
    color: var(--red);
    font-size: 8px;
    font-weight: 600;
    text-decoration: none;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 7px;
}

.panel-title strong {
    font-size: 11px;
}

.panel-icon {
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    color: var(--red);
}

.panel-icon.green {
    color: var(--green);
}

.panel-icon.blue {
    color: var(--blue);
}

.panel-icon svg {
    width: 16px;
    height: 16px;
}

.feed-list,
.status-list {
    display: grid;
}

.feed-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: start;
    min-height: 52px;
    padding: 11px 14px;
    border-bottom: 1px solid #f1f3f6;
}

.feed-row:last-child,
.status-row:last-child {
    border-bottom: 0;
}

.feed-row p {
    display: grid;
    gap: 2px;
    margin: 0;
    font-size: 9px;
    line-height: 1.4;
}

.feed-row p strong {
    font-size: 9px;
}

.feed-row p small {
    color: var(--muted);
    font-size: 8px;
}

.feed-row time {
    color: var(--muted);
    font-size: 8px;
    white-space: nowrap;
}

.feed-dot {
    width: 6px;
    height: 6px;
    margin-top: 4px;
    border-radius: 50%;
}

.feed-dot.red {
    background: var(--red);
}

.task-check {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border: 1px solid #9ad9ba;
    border-radius: 50%;
    color: var(--green);
    font-size: 9px;
}

.status-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 55px;
    padding: 9px 12px;
    border-bottom: 1px solid #f1f3f6;
}

.status-row p {
    display: grid;
    gap: 3px;
    margin: 0;
}

.status-row p strong {
    font-size: 9px;
}

.status-row p small {
    color: var(--muted);
    font-size: 8px;
}

.status-row time {
    color: var(--muted);
    font-size: 8px;
    line-height: 1.4;
    text-align: right;
}

.status-row time b {
    color: #303846;
    font-weight: 600;
}

.status-icon {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 7px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 8px;
    font-weight: 800;
}

.result-small {
    border: 5px solid var(--red);
    border-top-color: #f6a1aa;
    border-radius: 50%;
    background: #fff;
}

.bars-small {
    padding: 3px;
}

.bars-small i:nth-child(1) { height: 8px; }
.bars-small i:nth-child(2) { height: 14px; }
.bars-small i:nth-child(3) { height: 20px; }

/* Login */
.login-page {
    min-height: 100vh;
    padding: 22px 18px 10px;
    background: #f5f7fb;
}

.login-shell {
    display: grid;
    grid-template-columns: 54% 46%;
    width: min(1450px, calc(100vw - 36px));
    min-height: calc(100vh - 64px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 38px rgba(23, 32, 51, 0.08);
}

.login-showcase {
    position: relative;
    overflow: hidden;
    padding: 56px 60px 35px;
    background:
        radial-gradient(circle at 70% 38%, rgba(230,0,18,.05), transparent 24rem),
        linear-gradient(180deg, #fff 0%, #fffafa 100%);
}

.login-logo strong {
    font-size: 66px;
    letter-spacing: -0.065em;
}

.login-showcase h1 {
    margin: 34px 0 0;
    max-width: 720px;
    font-size: clamp(28px, 3vw, 43px);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.login-org {
    margin: 22px 0 0;
    color: #555f6f;
    font-size: 18px;
}

.login-accent-line {
    display: block;
    width: 54px;
    height: 3px;
    margin-top: 26px;
    background: var(--red);
}

.platform-illustration {
    position: absolute;
    inset: 260px 15px 0 15px;
}

.platform-illustration::before {
    content: "";
    position: absolute;
    inset: 5% 7% 8%;
    background:
        radial-gradient(circle at center, rgba(230,0,18,.05), transparent 45%),
        radial-gradient(circle, rgba(230,0,18,.2) 1px, transparent 1px);
    background-size: auto, 10px 10px;
    mask-image: radial-gradient(circle, #000 0 45%, transparent 70%);
}

.network-line {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(230,0,18,.35), rgba(230,0,18,.05));
}

.line-a { left: 47%; top: 46%; width: 31%; transform: rotate(-27deg); }
.line-b { left: 48%; top: 50%; width: 30%; transform: rotate(24deg); }
.line-c { left: 47%; top: 48%; width: 31%; transform: rotate(158deg); }
.line-d { left: 48%; top: 50%; width: 31%; transform: rotate(208deg); }
.line-e { left: 49%; top: 51%; width: 27%; transform: rotate(100deg); }
.line-f { left: 47%; top: 51%; width: 28%; transform: rotate(77deg); }

.feature-node {
    position: absolute;
    z-index: 3;
    display: grid;
    width: 102px;
    min-height: 110px;
    place-items: center;
    padding: 16px 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--red);
    background: rgba(255,255,255,.94);
    box-shadow: 0 10px 26px rgba(23, 32, 51, 0.1);
    text-align: center;
}

.feature-node svg {
    width: 43px;
    height: 43px;
    margin-bottom: 8px;
}

.feature-node strong {
    color: #151b26;
    font-size: 13px;
    line-height: 1.25;
}

.node-invoice { left: 22%; top: 9%; }
.node-kpi { right: 20%; top: 8%; }
.node-shared { left: 7%; top: 45%; }
.node-data { right: 6%; top: 45%; }
.node-tasks { left: 20%; bottom: 3%; }
.node-reports { right: 19%; bottom: 3%; }

.platform-core {
    position: absolute;
    z-index: 4;
    left: 50%;
    top: 51%;
    width: 185px;
    height: 160px;
    padding-top: 48px;
    color: #fff;
    border-radius: 28px;
    background:
        linear-gradient(145deg, #ff6572, #e60012 58%, #ba0010);
    box-shadow:
        0 18px 0 #ffccd1,
        0 29px 0 #fff,
        0 39px 0 #ffdde1,
        0 46px 35px rgba(230, 0, 18, 0.22);
    transform: translate(-50%, -50%) rotate(-1deg);
    text-align: center;
}

.platform-core::before,
.platform-core::after {
    content: "";
    position: absolute;
    top: -1px;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,.35);
}

.platform-core::before { left: 50%; }
.platform-core::after { display: none; }

.platform-core > strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.core-icons {
    display: flex;
    justify-content: center;
    gap: 35px;
    margin-top: 23px;
}

.core-icons svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.5;
}

.login-form-area {
    display: grid;
    place-items: center;
    padding: 55px;
    background: linear-gradient(180deg, #fff, #fffdfd);
}

.signin-card {
    width: min(510px, 100%);
    padding: 50px 46px 45px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(23, 32, 51, 0.08);
}

.signin-lock {
    display: grid;
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
    place-items: center;
    border-radius: 50%;
    color: var(--red);
    background: var(--red-soft);
}

.signin-lock svg {
    width: 38px;
    height: 38px;
}

.signin-card h2 {
    margin: 0;
    font-size: 28px;
    text-align: center;
    letter-spacing: -0.04em;
}

.signin-card > p {
    margin: 12px 0 38px;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

.signin-form {
    display: grid;
    gap: 22px;
}

.signin-form label {
    display: grid;
    gap: 10px;
}

.signin-form label > span {
    font-size: 14px;
    font-weight: 700;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
}

.input-shell:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.07);
}

.input-shell > svg {
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    margin-left: 18px;
    color: #758092;
}

.input-shell input {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
}

.password-toggle {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin-right: 6px;
    padding: 12px;
    border: 0;
    color: #758092;
    background: transparent;
    cursor: pointer;
}

.signin-button {
    display: flex;
    min-height: 61px;
    align-items: center;
    justify-content: center;
    gap: 13px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: var(--red);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.signin-button:hover {
    background: var(--red-dark);
}

.signin-button svg {
    width: 24px;
    height: 24px;
}

.login-footer {
    padding: 18px 0 4px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.form-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(230,0,18,.18);
    border-radius: 8px;
    color: #a41320;
    background: var(--red-soft);
    font-size: 12px;
}

/* Inner pages */
.inner-page-heading,
.admin-page-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.inner-heading-icon {
    display: grid;
    width: 55px;
    height: 55px;
    place-items: center;
    border-radius: 13px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 13px;
    font-weight: 800;
}

.inner-page-heading p,
.admin-page-heading p {
    margin: 0 0 4px;
    color: var(--red);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.inner-page-heading h1,
.admin-page-heading h1 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -0.04em;
}

.inner-page-heading span,
.admin-page-heading span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.admin-page-heading {
    justify-content: space-between;
}

.content-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
}

.empty-workspace {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.empty-workspace-icon {
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    border-radius: 18px;
    color: var(--red);
    background: var(--red-soft);
}

.empty-workspace-icon svg {
    width: 35px;
    height: 35px;
}

.empty-workspace h2 {
    margin: 20px 0 8px;
    font-size: 22px;
}

.empty-workspace p {
    max-width: 570px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.workspace-actions,
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-action {
    color: #fff;
    background: var(--red);
}

.secondary-action {
    color: #3f4856;
    border-color: var(--line);
    background: #fff;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.metric-row article {
    display: grid;
    gap: 6px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.metric-row span,
.metric-row small {
    color: var(--muted);
    font-size: 9px;
}

.metric-row strong {
    font-size: 26px;
    letter-spacing: -0.04em;
}

.data-placeholder-card {
    min-height: 360px;
}

.data-placeholder-card > header,
.admin-table-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
}

.data-placeholder-card > header strong,
.admin-table-card > header strong {
    font-size: 12px;
}

.data-placeholder-card > header span,
.admin-table-card > header span {
    color: var(--muted);
    font-size: 9px;
}

.data-placeholder {
    display: grid;
    min-height: 300px;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
}

/* Admin */
.success-banner,
.temporary-password-banner {
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 9px;
}

.success-banner {
    color: #11613d;
    border: 1px solid rgba(42,182,115,.18);
    background: var(--green-soft);
    font-size: 11px;
}

.temporary-password-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(230,0,18,.15);
    background: var(--red-soft);
}

.temporary-password-banner > div {
    display: grid;
    gap: 4px;
}

.temporary-password-banner span,
.temporary-password-banner small {
    color: var(--muted);
    font-size: 9px;
}

.temporary-password-banner strong {
    font-family: Consolas, monospace;
    font-size: 19px;
}

.temporary-password-banner button,
.row-actions button {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: #3f4856;
    background: #fff;
    font: inherit;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.admin-table-card {
    overflow: hidden;
}

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

.oneflow-table {
    width: 100%;
    min-width: 930px;
    border-collapse: collapse;
}

.oneflow-table th,
.oneflow-table td {
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 9px;
}

.oneflow-table th {
    color: var(--muted);
    background: #fafbfc;
    font-size: 8px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.oneflow-table tbody tr:hover {
    background: #fff9fa;
}

.table-person {
    display: flex;
    align-items: center;
    gap: 9px;
}

.table-person > span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ffb2b8, #ef6e79);
    font-size: 8px;
    font-weight: 800;
}

.table-person p {
    display: grid;
    gap: 2px;
    margin: 0;
}

.table-person small,
.oneflow-table small {
    color: var(--muted);
}

.role-pill,
.state-pill {
    display: inline-flex;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 700;
}

.role-pill {
    color: var(--red);
    background: var(--red-soft);
}

.state-pill.active {
    color: #168853;
    background: var(--green-soft);
}

.state-pill.disabled {
    color: #687181;
    background: #eef0f4;
}

.warning-text {
    color: var(--warning);
}

.success-text {
    color: var(--green);
}

.row-actions {
    display: flex;
    gap: 6px;
}

.row-actions .danger-action {
    color: var(--red);
    border-color: rgba(230,0,18,.14);
    background: var(--red-soft);
}

.admin-form-card {
    max-width: 720px;
    padding: 22px;
}

.oneflow-form {
    display: grid;
    gap: 17px;
}

.oneflow-form label {
    display: grid;
    gap: 7px;
}

.oneflow-form label > span {
    font-size: 10px;
    font-weight: 700;
}

.oneflow-form label small {
    color: var(--muted);
    font-size: 9px;
}

.oneflow-form input,
.oneflow-form select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d9dee8;
    border-radius: 7px;
    outline: none;
    background: #fff;
    font: inherit;
    font-size: 11px;
}

.oneflow-form input:focus,
.oneflow-form select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(230,0,18,.06);
}

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

.empty-table-cell {
    padding: 40px !important;
    color: var(--muted);
    text-align: center !important;
}

/* Change password */
.password-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 30px;
    background: #f5f7fb;
}

.password-card {
    width: min(520px, 100%);
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}

.compact-logo {
    justify-content: center;
    margin-bottom: 25px;
}

.password-card h1 {
    margin: 0;
    font-size: 28px;
    text-align: center;
}

.password-card > p {
    margin: 10px 0 25px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.password-rule {
    display: block;
    margin-top: 15px;
    color: var(--muted);
    font-size: 9px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1100px) {
    .locked-module-grid {
        grid-template-columns: 1fr 1fr;
    }

    .data-card {
        grid-column: span 2;
    }

    .dashboard-lower-grid {
        grid-template-columns: 1fr 1fr;
    }

    .status-panel {
        grid-column: span 2;
    }

    .login-showcase {
        padding: 42px 38px;
    }

    .platform-illustration {
        transform: scale(.88);
        transform-origin: center top;
    }
}

@media (max-width: 850px) {
    .brand-description {
        display: none;
    }

    .brand-divider {
        display: none;
    }

    .app-layout {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .side-link {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 4px;
        font-size: 8px;
        text-align: center;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        min-height: 580px;
    }

    .login-form-area {
        padding: 35px 22px;
    }
}

@media (max-width: 680px) {
    .app-header {
        padding: 0 14px;
    }

    .header-user-copy {
        display: none;
    }

    .app-layout {
        display: block;
    }

    .side-nav {
        position: sticky;
        top: 72px;
        z-index: 40;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .side-nav nav {
        position: static;
        display: flex;
        width: max-content;
        padding: 8px 10px;
    }

    .side-link {
        min-width: 74px;
    }

    .page-content {
        padding: 20px 14px 28px;
    }

    .locked-module-grid,
    .dashboard-lower-grid,
    .metric-row {
        grid-template-columns: 1fr;
    }

    .data-card,
    .status-panel {
        grid-column: auto;
    }

    .locked-module-card {
        min-height: 300px;
    }

    .login-page {
        padding: 0;
    }

    .login-shell {
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .login-showcase {
        min-height: 520px;
        padding: 30px 22px;
    }

    .login-logo strong {
        font-size: 48px;
    }

    .login-showcase h1 {
        font-size: 28px;
    }

    .platform-illustration {
        inset: 230px -30px 0;
        transform: scale(.7);
    }

    .signin-card {
        padding: 35px 24px;
    }

    .admin-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* v0.6.1 - Readability scale-up */
.app-layout {
    grid-template-columns: 132px minmax(0, 1fr);
}

.side-nav nav {
    padding: 18px 12px;
    gap: 7px;
}

.side-link {
    grid-template-columns: 27px 1fr;
    min-height: 44px;
    padding: 9px 10px;
    font-size: 11px;
}

.side-icon {
    width: 22px;
    height: 22px;
}

.side-icon svg {
    width: 19px;
    height: 19px;
}

.page-content {
    padding: 30px 28px 38px;
}

.dashboard-greeting {
    margin-bottom: 26px;
}

.dashboard-greeting h1 {
    font-size: 27px;
}

.dashboard-greeting p {
    margin-top: 8px;
    font-size: 13px;
}

.locked-module-grid {
    gap: 18px;
}

.locked-module-card {
    min-height: 322px;
    padding: 23px 21px 18px;
    border-radius: 15px;
}

.module-card-top {
    gap: 15px;
}

.module-visual-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
}

.module-visual-icon svg {
    width: 33px;
    height: 33px;
}

.module-card-top h2 {
    margin: 6px 0 6px;
    font-size: 17px;
}

.module-card-top p {
    font-size: 12px;
    line-height: 1.5;
}

.development-badge {
    margin-top: 8px;
    padding: 5px 8px;
    font-size: 9px;
}

.open-module-button {
    left: 21px;
    bottom: 18px;
    min-height: 36px;
    padding: 0 15px;
    font-size: 11px;
}

.kpi-quick-stack {
    gap: 9px;
    margin-top: 18px;
}

.kpi-quick-stack a {
    grid-template-columns: 31px 1fr auto;
    min-height: 54px;
    padding: 9px 12px;
    border-radius: 10px;
}

.kpi-quick-stack strong {
    font-size: 12px;
}

.kpi-quick-stack small {
    font-size: 9px;
}

.mini-icon {
    width: 27px;
    height: 27px;
}

.dashboard-lower-grid {
    gap: 18px;
    margin-top: 22px;
}

.dashboard-panel {
    border-radius: 13px;
}

.dashboard-panel > header {
    min-height: 50px;
    padding: 0 16px;
}

.dashboard-panel > header a {
    font-size: 9px;
}

.panel-title {
    gap: 9px;
}

.panel-title strong {
    font-size: 13px;
}

.panel-icon {
    width: 22px;
    height: 22px;
}

.panel-icon svg {
    width: 18px;
    height: 18px;
}

.feed-row {
    min-height: 62px;
    padding: 13px 16px;
    gap: 10px;
}

.feed-row p {
    font-size: 10.5px;
    line-height: 1.5;
}

.feed-row p strong {
    font-size: 10.5px;
}

.feed-row p small {
    font-size: 9px;
}

.feed-row time {
    font-size: 9px;
}

.status-row {
    grid-template-columns: 32px 1fr auto;
    min-height: 65px;
    padding: 11px 14px;
    gap: 10px;
}

.status-icon {
    width: 30px;
    height: 30px;
    font-size: 9px;
}

.status-row p strong {
    font-size: 10.5px;
}

.status-row p small,
.status-row time {
    font-size: 9px;
}

.inner-page-heading h1,
.admin-page-heading h1 {
    font-size: 29px;
}

.inner-page-heading span,
.admin-page-heading span {
    font-size: 12px;
}

.content-card {
    border-radius: 14px;
}

.oneflow-table th,
.oneflow-table td {
    padding: 14px 16px;
    font-size: 10.5px;
}

.oneflow-table th {
    font-size: 9px;
}

.table-person > span {
    width: 34px;
    height: 34px;
    font-size: 9px;
}

.role-pill,
.state-pill {
    padding: 5px 8px;
    font-size: 9px;
}

.row-actions button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 9.5px;
}

.oneflow-form label > span {
    font-size: 11px;
}

.oneflow-form label small {
    font-size: 10px;
}

.oneflow-form input,
.oneflow-form select {
    height: 46px;
    font-size: 12px;
}

.primary-action,
.secondary-action {
    min-height: 42px;
    padding: 0 16px;
    font-size: 11px;
}

@media (max-width: 850px) {
    .app-layout {
        grid-template-columns: 98px minmax(0, 1fr);
    }

    .side-link {
        grid-template-columns: 1fr;
        font-size: 9px;
    }
}


/* ============================================================
   v0.6.2 - OFFICIAL BRAND + HEADER + SIDEBAR LOCK
   Latest approved mockup is the single source of truth.
   ============================================================ */

:root {
    --shell-bg: #f3f5f8;
    --topbar-bg: #f7f8fa;
    --sidebar-bg: #f5f6f8;
    --content-bg: #ffffff;
    --shell-border: #e2e6ec;
}

.app-body {
    min-height: 100vh;
    background: var(--shell-bg);
}

.shell-header {
    position: sticky;
    top: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: 100px;
    border-bottom: 1px solid var(--shell-border);
    background: var(--topbar-bg);
    box-shadow: 0 4px 16px rgba(20, 30, 50, 0.05);
}

.vss-brand-zone {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--shell-border);
    background:
        linear-gradient(180deg, #f4f5f7, #f1f3f6);
}

.vss-mark {
    position: relative;
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    overflow: hidden;
    border-radius: 20px;
    color: #ffffff;
    background:
        linear-gradient(145deg, #ff2434 0%, #ef0015 46%, #c90010 100%);
    box-shadow:
        0 12px 24px rgba(230, 0, 18, 0.22),
        inset 0 1px 0 rgba(255,255,255,.35);
    text-decoration: none;
    transform: translateZ(0);
}

.vss-mark::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 15px;
}

.vss-mark::after {
    content: "";
    position: absolute;
    width: 54px;
    height: 18px;
    left: -14px;
    top: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.11);
    transform: rotate(-24deg);
}

.vss-mark-shine {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 28% 20%, rgba(255,255,255,.32), transparent 28%);
    pointer-events: none;
}

.vss-mark strong {
    position: relative;
    z-index: 2;
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.07em;
    transform: translateX(-1px);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 24px 0 46px;
    background:
        linear-gradient(180deg, #fafbfc 0%, #f6f7f9 100%);
}

.topbar-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 18px;
    text-decoration: none;
}

.oneflow-wordmark {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
    font-family:
        "Arial Rounded MT Bold",
        "Trebuchet MS",
        "Segoe UI Rounded",
        "Segoe UI",
        sans-serif;
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.075em;
    text-rendering: geometricPrecision;
}

.word-one {
    color: var(--red);
}

.word-flow {
    color: #151b26;
}

.brand-separator {
    width: 1px;
    height: 47px;
    flex: 0 0 auto;
    background: #dfe3e9;
}

.brand-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.brand-copy strong {
    overflow: hidden;
    color: #151b26;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy small {
    color: #6b7280;
    font-size: 13px;
}

.topbar-user-zone {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 16px;
}

.notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    color: #394354;
    background: transparent;
    cursor: pointer;
}

.notification-button svg {
    width: 24px;
    height: 24px;
}

.notification-button span {
    position: absolute;
    top: 2px;
    right: 1px;
    display: grid;
    width: 17px;
    height: 17px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--red);
    font-size: 9px;
    font-weight: 800;
}

.user-summary {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ffb2b8, #ef6e79);
    font-size: 15px;
    font-weight: 800;
}

.user-copy {
    display: grid;
    gap: 3px;
}

.user-copy strong {
    color: #151b26;
    font-size: 15px;
}

.user-copy small {
    color: #6b7280;
    font-size: 12px;
}

.user-chevron {
    color: #4c5564;
    font-size: 18px;
}

.topbar-divider {
    width: 1px;
    height: 44px;
    background: #dfe3e9;
}

.logout-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 17px;
    border: 1px solid #d8dde5;
    border-radius: 12px;
    color: var(--red);
    background: rgba(255,255,255,.78);
    box-shadow: 0 3px 10px rgba(20,30,50,.03);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: 160ms ease;
}

.logout-button:hover {
    border-color: rgba(230,0,18,.35);
    background: #fff;
    box-shadow: 0 7px 18px rgba(230,0,18,.09);
    transform: translateY(-1px);
}

.logout-button svg {
    width: 21px;
    height: 21px;
}

.shell-main {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: calc(100vh - 141px);
}

.sidebar {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    border-right: 1px solid var(--shell-border);
    background:
        linear-gradient(180deg, #f5f6f8 0%, #f2f4f7 100%);
}

.sidebar-nav {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 6px;
    padding: 18px 14px;
}

.sidebar-link {
    display: grid;
    grid-template-columns: 29px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 13px;
    border-radius: 11px;
    color: #394354;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: 150ms ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--red);
    background: #ffecee;
    box-shadow: inset 0 0 0 1px rgba(230,0,18,.04);
}

.sidebar-icon {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
}

.sidebar-icon svg {
    width: 22px;
    height: 22px;
}

.sidebar-collapse {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    margin-top: auto;
    padding: 0 20px;
    border-top: 1px solid var(--shell-border);
    color: #4c5564;
    font-size: 13px;
}

.collapse-icon {
    font-size: 22px;
    line-height: 1;
}

.content-area {
    min-width: 0;
    padding: 28px 36px 36px;
    background:
        radial-gradient(circle at 100% 0%, rgba(230,0,18,.025), transparent 28rem),
        var(--content-bg);
}

.app-footer {
    padding: 15px 24px;
    border-top: 1px solid var(--shell-border);
    color: #6b7280;
    background: #f7f8fa;
    font-size: 11px;
    text-align: center;
}

.login-wordmark {
    font-size: 68px;
}

/* Neutralize obsolete shell rules from older versions. */
.app-header,
.app-layout,
.side-nav,
.page-content {
    all: unset;
}

@media (max-width: 1180px) {
    .shell-header,
    .shell-main {
        grid-template-columns: 154px minmax(0, 1fr);
    }

    .topbar {
        padding-left: 26px;
    }

    .brand-copy strong {
        max-width: 370px;
        font-size: 14px;
    }

    .oneflow-wordmark {
        font-size: 34px;
    }

    .user-copy {
        display: none;
    }

    .sidebar-link {
        font-size: 12px;
    }
}

@media (max-width: 820px) {
    .shell-header {
        grid-template-columns: 86px minmax(0, 1fr);
        min-height: 82px;
    }

    .vss-mark {
        width: 54px;
        height: 54px;
        border-radius: 15px;
    }

    .vss-mark strong {
        font-size: 21px;
    }

    .topbar {
        padding: 0 12px 0 18px;
    }

    .brand-copy,
    .brand-separator,
    .notification-button,
    .user-summary,
    .topbar-divider {
        display: none;
    }

    .oneflow-wordmark {
        font-size: 31px;
    }

    .logout-button {
        min-height: 42px;
        padding: 0 12px;
    }

    .shell-main {
        display: block;
    }

    .sidebar {
        position: sticky;
        top: 82px;
        z-index: 60;
        overflow-x: auto;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--shell-border);
    }

    .sidebar-nav {
        position: static;
        display: flex;
        width: max-content;
        padding: 8px 10px;
    }

    .sidebar-link {
        grid-template-columns: 1fr;
        min-width: 76px;
        min-height: 58px;
        justify-items: center;
        gap: 4px;
        padding: 7px 8px;
        font-size: 10px;
        text-align: center;
    }

    .sidebar-collapse {
        display: none;
    }

    .content-area {
        padding: 20px 14px 28px;
    }
}


/* ============================================================
   v0.6.3 - LOGIN WORDMARK + ILLUSTRATION FIX
   ============================================================ */

.vss-mark {
    width: 72px;
    height: 72px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.vss-mark::before,
.vss-mark::after,
.vss-mark-shine,
.vss-mark strong {
    display: none;
}

.vss-mark img {
    display: block;
    width: 72px;
    height: 72px;
}

.oneflow-wordmark-image {
    display: block;
    width: 212px;
    height: auto;
    flex: 0 0 auto;
}

.login-logo {
    display: block;
}

.login-wordmark-image {
    display: block;
    width: min(330px, 68%);
    height: auto;
}

.login-showcase {
    padding: 48px 54px 34px;
}

.login-showcase h1 {
    display: grid;
    gap: 4px;
    max-width: none;
    margin: 30px 0 0;
    font-size: clamp(29px, 2.25vw, 38px);
    line-height: 1.22;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

.login-showcase h1 span {
    display: block;
}

.login-org {
    margin-top: 19px;
    font-size: 16px;
}

.login-accent-line {
    margin-top: 23px;
}

.platform-illustration {
    position: relative;
    inset: auto;
    width: 100%;
    height: 500px;
    margin-top: 24px;
}

.feature-node {
    width: 88px;
    min-height: 94px;
    padding: 12px 8px;
    border-radius: 16px;
}

.feature-node svg {
    width: 34px;
    height: 34px;
    margin-bottom: 7px;
}

.feature-node strong {
    font-size: 11px;
    line-height: 1.2;
}

.node-invoice {
    left: 23%;
    top: 1%;
}

.node-kpi {
    right: 21%;
    top: 1%;
}

.node-shared {
    left: 4%;
    top: 34%;
}

.node-data {
    right: 3%;
    top: 34%;
}

.node-tasks {
    left: 20%;
    bottom: 1%;
}

.node-reports {
    right: 19%;
    bottom: 1%;
}

.platform-core {
    top: 51%;
    width: 166px;
    height: 145px;
    padding-top: 42px;
}

.core-wordmark-image {
    display: block;
    width: 112px;
    height: auto;
    margin: 0 auto;
}

.core-icons {
    margin-top: 20px;
    gap: 29px;
}

.core-icons svg {
    width: 27px;
    height: 27px;
}

.network-line {
    opacity: 0.85;
}

@media (max-width: 1180px) {
    .oneflow-wordmark-image {
        width: 184px;
    }

    .login-wordmark-image {
        width: min(285px, 72%);
    }

    .login-showcase {
        padding: 42px 38px 30px;
    }

    .login-showcase h1 {
        font-size: clamp(27px, 2.45vw, 34px);
    }

    .platform-illustration {
        height: 470px;
        margin-top: 20px;
        transform: none;
    }
}

@media (max-width: 850px) {
    .login-showcase {
        min-height: 720px;
    }

    .login-showcase h1 {
        white-space: normal;
    }

    .platform-illustration {
        height: 470px;
    }
}

@media (max-width: 680px) {
    .oneflow-wordmark-image {
        width: 160px;
    }

    .login-wordmark-image {
        width: 245px;
    }

    .login-showcase {
        min-height: 700px;
        padding: 30px 22px;
    }

    .login-showcase h1 {
        font-size: 27px;
    }

    .platform-illustration {
        inset: auto;
        width: 620px;
        height: 450px;
        margin-left: 50%;
        transform: translateX(-50%) scale(.78);
        transform-origin: center top;
    }
}


/* ============================================================
   v0.7.0 - ROLE-BASED ACCESS CONTROL
   ============================================================ */

.admin-heading-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.permission-role-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 14px;
}

.permission-role-tab {
    display: grid;
    gap: 4px;
    min-height: 61px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #4b5563;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.permission-role-tab strong {
    font-size: 11px;
}

.permission-role-tab small {
    color: var(--muted);
    font-size: 8px;
}

.permission-role-tab:hover,
.permission-role-tab.active {
    color: var(--red);
    border-color: rgba(230, 0, 18, 0.2);
    background: var(--red-soft);
}

.permission-form {
    display: none;
}

.permission-form.active {
    display: block;
}

.permission-card {
    overflow: hidden;
}

.permission-card > header {
    display: flex;
    min-height: 67px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}

.permission-card > header > div {
    display: grid;
    gap: 4px;
}

.permission-card > header strong {
    font-size: 14px;
}

.permission-card > header span {
    color: var(--muted);
    font-size: 10px;
}

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

.permission-group {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.permission-group h2 {
    margin: 0;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: #3f4856;
    background: #fafbfc;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.permission-item {
    position: relative;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    min-height: 88px;
    align-items: start;
    padding: 14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

.permission-item:nth-child(2n) {
    border-right: 0;
}

.permission-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.permission-check {
    position: relative;
    display: block;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    border: 1px solid #cfd5df;
    border-radius: 5px;
    background: #fff;
}

.permission-item input:checked + input + .permission-check,
.permission-item input:checked + .permission-check {
    border-color: var(--red);
    background: var(--red);
}

.permission-item input:checked + input + .permission-check::after,
.permission-item input:checked + .permission-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.permission-item:hover {
    background: #fffafb;
}

.permission-copy {
    display: grid;
    gap: 5px;
}

.permission-copy strong {
    font-size: 11px;
}

.permission-copy small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.permission-copy code {
    width: fit-content;
    padding: 3px 6px;
    border-radius: 4px;
    color: #596273;
    background: #f2f4f7;
    font-size: 8px;
}

.access-denied-card {
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.access-denied-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 24px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 25px;
    font-weight: 900;
}

.access-denied-card h1 {
    margin: 22px 0 8px;
    font-size: 27px;
}

.access-denied-card p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.access-denied-card code {
    margin: 14px 0;
    padding: 6px 9px;
    border-radius: 6px;
    color: #596273;
    background: #f2f4f7;
    font-size: 10px;
}

.access-denied-card .primary-action {
    margin-top: 12px;
}

.no-access-card {
    min-height: 180px;
}

@media (max-width: 1100px) {
    .permission-role-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .permission-role-tabs,
    .permission-list {
        grid-template-columns: 1fr;
    }

    .permission-item {
        border-right: 0;
    }

    .permission-card > header,
    .admin-heading-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* v0.8.0 - System configuration, working calendar and schedules */
.configuration-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.configuration-card { display:grid; grid-template-columns:48px 1fr; gap:8px 13px; min-height:150px; padding:20px; border:1px solid var(--line); border-radius:13px; background:#fff; box-shadow:var(--shadow); text-decoration:none; }
.configuration-card:hover { border-color:rgba(230,0,18,.22); transform:translateY(-2px); }
.configuration-icon { grid-row:span 3; display:grid; width:48px; height:48px; place-items:center; border-radius:13px; color:var(--red); background:var(--red-soft); font-size:12px; font-weight:900; }
.configuration-card strong { align-self:end; font-size:15px; }
.configuration-card small { color:var(--muted); font-size:10px; line-height:1.5; }
.configuration-card b { color:var(--red); font-size:9px; }
.calendar-layout { display:grid; grid-template-columns:1.25fr .75fr; gap:14px; margin-bottom:14px; }
.settings-card, .holiday-card { overflow:hidden; }
.settings-card>header, .holiday-card>header, .schedule-card>header { display:flex; align-items:center; justify-content:space-between; min-height:58px; padding:12px 18px; border-bottom:1px solid var(--line); }
.settings-card>header div, .holiday-card>header div, .schedule-card>header div { display:grid; gap:4px; }
.settings-card>header strong, .holiday-card>header strong, .schedule-card>header strong { font-size:13px; }
.settings-card>header span, .holiday-card>header span, .schedule-card>header span { color:var(--muted); font-size:9px; }
.settings-form { padding:18px; }
.weekday-fieldset { margin:0; padding:0; border:0; }
.weekday-fieldset legend { margin-bottom:8px; font-size:10px; font-weight:700; }
.weekday-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.weekday-option { position:relative; display:block!important; }
.weekday-option input { position:absolute; opacity:0; }
.weekday-option span { display:grid; min-height:39px; place-items:center; border:1px solid var(--line); border-radius:7px; color:#4b5563; background:#fff; font-size:9px; cursor:pointer; }
.weekday-option input:checked+span { color:var(--red); border-color:rgba(230,0,18,.25); background:var(--red-soft); }
.time-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.calculation-result { display:grid; gap:5px; margin:0 18px 18px; padding:17px; border-radius:10px; color:#11613d; background:var(--green-soft); text-align:center; }
.calculation-result span,.calculation-result small { font-size:9px; }
.calculation-result strong { font-size:27px; }
.holiday-form { display:grid; grid-template-columns:180px 1fr auto; gap:10px; padding:16px 18px; }
.holiday-form input { height:42px; padding:0 11px; border:1px solid #d9dee8; border-radius:7px; font:inherit; font-size:11px; }
.table-delete-button { min-height:31px; padding:0 10px; border:1px solid rgba(230,0,18,.15); border-radius:6px; color:var(--red); background:var(--red-soft); font:inherit; font-size:9px; font-weight:700; cursor:pointer; }
.schedule-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.schedule-card { overflow:hidden; padding-bottom:17px; }
.schedule-card>p { min-height:44px; margin:15px 18px; color:var(--muted); font-size:10px; line-height:1.5; }
.schedule-card>label { display:grid; gap:7px; margin:0 18px; }
.schedule-card>label>span { font-size:10px; font-weight:700; }
.schedule-card>label>small { color:var(--muted); font-size:8px; }
.schedule-card input[type=text] { height:42px; padding:0 11px; border:1px solid #d9dee8; border-radius:7px; font:inherit; font-size:11px; }
.schedule-times { display:flex; flex-wrap:wrap; gap:6px; min-height:28px; margin:14px 18px 0; }
.schedule-times b { padding:5px 8px; border-radius:999px; color:var(--red); background:var(--red-soft); font-size:9px; }
.schedule-card .form-actions { margin:15px 18px 0; }
.toggle-control { position:relative; margin:0!important; }
.toggle-control input { position:absolute; opacity:0; }
.toggle-control>span { position:relative; display:block; width:42px; height:24px; border-radius:999px; background:#cfd5df; cursor:pointer; }
.toggle-control>span:after { content:""; position:absolute; left:3px; top:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:.15s; }
.toggle-control input:checked+span { background:var(--red); }
.toggle-control input:checked+span:after { transform:translateX(18px); }
@media (max-width:1050px){ .configuration-grid,.schedule-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .calendar-layout{grid-template-columns:1fr;} }
@media (max-width:700px){ .configuration-grid,.schedule-grid,.time-grid{grid-template-columns:1fr;} .weekday-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .holiday-form{grid-template-columns:1fr;} }

/* ============================================================
   v0.9.0 - USER, PERMISSION AND BUSINESS AREA MANAGEMENT
   ============================================================ */
.password-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #d8dde5;
    border-radius: 12px;
    color: #394354;
    background: rgba(255,255,255,.78);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 160ms ease;
}
.password-button:hover { color: var(--red); border-color: rgba(230,0,18,.25); background:#fff; }
.password-button svg { width:19px; height:19px; }
.password-wordmark-image { display:block; width:230px; height:auto; margin:0 auto; }
.password-back-link { display:block; margin-top:14px; color:#5c6676; font-size:10px; text-align:center; text-decoration:none; }
.password-back-link:hover { color:var(--red); }
.login-success-banner { margin: 0 0 14px; }

.user-filter-card { margin-bottom:14px; padding:15px 17px; }
.user-filter-form { display:grid; grid-template-columns:1.35fr .9fr .75fr 1fr auto; gap:10px; align-items:end; }
.user-filter-form label { display:grid; gap:6px; }
.user-filter-form label>span { font-size:9px; font-weight:700; color:#48515f; }
.user-filter-form input,.user-filter-form select { width:100%; height:39px; padding:0 10px; border:1px solid #d9dee8; border-radius:7px; background:#fff; font:inherit; font-size:10px; }
.filter-actions { display:flex; gap:7px; align-items:center; }
.user-management-table { min-width:1080px; }
.scope-summary { display:block; max-width:300px; color:#667085; font-size:8px; line-height:1.45; }
.login-failed-note { display:block; margin-top:5px; color:#b54708; font-size:8px; }
.empty-table-cell { padding:34px!important; color:var(--muted); text-align:center!important; }
.row-actions>a,.row-actions button,.table-action-button { display:inline-flex; min-height:30px; align-items:center; justify-content:center; padding:0 9px; border:1px solid #d9dee8; border-radius:6px; color:#475467; background:#fff; font:inherit; font-size:8px; font-weight:700; text-decoration:none; cursor:pointer; }
.pagination-bar { display:flex; justify-content:center; gap:6px; padding:15px; border-top:1px solid var(--line); }
.pagination-bar a { display:grid; min-width:31px; height:31px; place-items:center; border:1px solid var(--line); border-radius:6px; color:#475467; background:#fff; font-size:9px; text-decoration:none; }
.pagination-bar a.active { color:#fff; border-color:var(--red); background:var(--red); }

.user-editor { display:grid; gap:14px; }
.user-editor-section { overflow:hidden; }
.user-editor-section>header { display:flex; align-items:center; justify-content:space-between; min-height:61px; padding:12px 18px; border-bottom:1px solid var(--line); }
.user-editor-section>header>div { display:grid; gap:4px; }
.user-editor-section>header strong { font-size:13px; }
.user-editor-section>header span { color:var(--muted); font-size:9px; }
.user-editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; padding:18px; }
.user-editor-grid>label { display:grid; gap:7px; }
.user-editor-grid>label>span { font-size:10px; font-weight:700; }
.user-editor-grid input,.user-editor-grid select { width:100%; height:42px; padding:0 11px; border:1px solid #d9dee8; border-radius:7px; background:#fff; font:inherit; font-size:11px; }
.user-editor-grid input[readonly] { color:#667085; background:#f5f7fa; }
.user-editor-grid label>small { color:var(--muted); font-size:8px; }
.switch-field { align-content:start; }
.switch-row { display:flex!important; align-items:center; gap:9px; min-height:42px; }
.switch-row input { width:18px!important; height:18px!important; }
.switch-row b { font-size:10px; }
.account-security-summary { display:grid; gap:5px; padding:13px; border:1px solid var(--line); border-radius:8px; background:#fafbfc; }
.account-security-summary span,.account-security-summary small { color:var(--muted); font-size:8px; }
.account-security-summary strong { font-size:12px; }
.user-permission-groups { padding:16px; }
.module-scope-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; padding:16px; }
.module-scope-card { min-width:0; padding:15px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.module-scope-card h2 { margin:0 0 12px; font-size:12px; }
.scope-mode-options { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
.scope-mode-options label { display:flex; align-items:center; gap:6px; min-height:39px; padding:8px; border:1px solid var(--line); border-radius:7px; font-size:9px; cursor:pointer; }
.scope-mode-options input { accent-color:var(--red); }
.scope-all-summary { display:grid; gap:5px; margin-top:12px; padding:14px; border-radius:8px; color:#a80010; background:var(--red-soft); }
.scope-all-summary strong { font-size:17px; }
.scope-all-summary span { font-size:8px; line-height:1.45; }
.ba-selector { margin-top:12px; }
.ba-selector>input { width:100%; height:38px; padding:0 10px; border:1px solid #d9dee8; border-radius:7px; font:inherit; font-size:9px; }
.ba-option-list { max-height:220px; overflow:auto; margin-top:8px; border:1px solid var(--line); border-radius:8px; }
.ba-option-list>label { display:grid; grid-template-columns:20px 1fr; gap:7px; align-items:center; min-height:44px; padding:8px 10px; border-bottom:1px solid #eef1f5; cursor:pointer; }
.ba-option-list>label:last-child { border-bottom:0; }
.ba-option-list>label:hover { background:#fffafb; }
.ba-option-list input { accent-color:var(--red); }
.ba-option-list label>span { display:grid; gap:2px; }
.ba-option-list strong { font-size:9px; }
.ba-option-list small { color:var(--muted); font-size:8px; }
.ba-option-list p { margin:0; padding:18px; color:var(--muted); font-size:9px; line-height:1.5; }
.selected-ba-count { display:block; margin-top:7px; color:var(--red); font-size:8px; font-weight:700; }
.sticky-form-actions { position:sticky; bottom:10px; z-index:20; display:flex; justify-content:flex-end; gap:9px; padding:12px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.94); box-shadow:0 10px 28px rgba(20,30,50,.1); backdrop-filter:blur(8px); }

.ba-admin-grid { display:grid; grid-template-columns:.8fr 1.2fr; gap:14px; margin-bottom:14px; }
.ba-entry-card { overflow:hidden; }
.ba-entry-card>header { min-height:61px; padding:12px 18px; border-bottom:1px solid var(--line); }
.ba-entry-card>header>div { display:grid; gap:4px; }
.ba-entry-card>header strong { font-size:12px; }
.ba-entry-card>header span { color:var(--muted); font-size:9px; }
.compact-admin-form { padding:17px; }
.compact-admin-form textarea { width:100%; padding:10px; border:1px solid #d9dee8; border-radius:7px; resize:vertical; font:inherit; font-size:10px; line-height:1.5; }
.table-action-button { min-height:31px; }

@media (max-width:1250px) {
    .topbar-user-zone { gap:9px; }
    .password-button span { display:none; }
    .password-button { width:45px; padding:0; }
    .user-filter-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .filter-actions { grid-column:1 / -1; }
    .module-scope-grid { grid-template-columns:1fr; }
}
@media (max-width:820px) {
    .password-button { display:none; }
    .user-filter-form,.user-editor-grid,.ba-admin-grid { grid-template-columns:1fr; }
    .admin-heading-actions { width:100%; }
    .scope-mode-options { grid-template-columns:1fr; }
}
.data-scope-banner { display:flex; align-items:center; gap:8px; margin:0 0 12px; padding:10px 13px; border:1px solid #e6e9ef; border-radius:8px; color:#4b5563; background:#fafbfc; font-size:9px; }
.data-scope-banner strong { color:#1e2735; }
.data-scope-banner span { color:var(--red); font-weight:700; }


/* ============================================================
   v1.0.0 - UAT DATA PILOT
   Header alignment, contextual back buttons, bulk import,
   KPI data ingestion and first calculation layer.
   ============================================================ */

.side-brand-zone {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--shell-border);
    background: linear-gradient(180deg, #f4f5f7, #f1f3f6);
}

.side-oneflow-brand {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 100%;
    padding: 0 14px;
}

.side-oneflow-brand img {
    display: block;
    width: 154px;
    max-width: 100%;
    height: auto;
}

.descriptor-brand {
    gap: 0;
}

.topbar {
    padding-left: 26px;
}

.descriptor-brand .brand-copy strong {
    max-width: none;
}

.page-back-row {
    min-height: 30px;
    margin: -4px 0 10px;
}

.page-back-button {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #dfe3e9;
    border-radius: 8px;
    color: #4c5564;
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    transition: 150ms ease;
}

.page-back-button:hover {
    color: var(--red);
    border-color: rgba(230, 0, 18, .22);
    background: var(--red-soft);
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
}

.import-upload-card {
    padding: 22px;
}

.import-step-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.import-step-list span {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #4b5563;
    background: #fafbfc;
    font-size: 10px;
    font-weight: 700;
}

.import-step-list b {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--red);
}

.import-upload-form {
    display: grid;
    gap: 16px;
    justify-items: start;
}

.file-drop-zone {
    display: grid;
    width: 100%;
    min-height: 170px;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 24px;
    border: 2px dashed #d9dee7;
    border-radius: 13px;
    color: #4c5564;
    background: #fafbfc;
    text-align: center;
    cursor: pointer;
}

.file-drop-zone:hover {
    border-color: rgba(230, 0, 18, .35);
    background: #fffafb;
}

.file-drop-zone strong {
    color: #151b26;
    font-size: 14px;
}

.file-drop-zone span {
    color: var(--muted);
    font-size: 10px;
}

.file-drop-zone input {
    max-width: 360px;
    margin-top: 8px;
    font-size: 10px;
}

.compact-metrics article strong {
    font-size: 22px;
}

.preview-grid,
.kpi-dashboard-grid,
.status-distribution-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, .8fr);
    gap: 14px;
    margin-bottom: 14px;
}

.preview-summary-card,
.latest-batch-card,
.distribution-card,
.quality-detail-card {
    overflow: hidden;
}

.preview-summary-card > header,
.latest-batch-card > header,
.distribution-card > header,
.quality-detail-card > header,
.kpi-ba-card > header {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

.quality-list {
    display: grid;
}

.quality-list p {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 10px;
}

.quality-list p:last-child {
    border-bottom: 0;
}

.quality-list b {
    color: var(--red);
    font-size: 13px;
}

.four-columns {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.four-columns p {
    border-right: 1px solid var(--line);
    border-bottom: 0;
}

.batch-summary {
    display: grid;
    gap: 7px;
    padding: 18px;
}

.batch-summary > b {
    width: fit-content;
    padding: 4px 7px;
    border-radius: 5px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 9px;
}

.batch-summary h3,
.batch-summary p {
    margin: 0;
}

.batch-summary h3 {
    font-size: 13px;
    word-break: break-word;
}

.batch-summary p,
.batch-summary small {
    color: var(--muted);
    font-size: 9px;
}

.batch-summary > strong {
    color: #151b26;
    font-size: 22px;
}

.distribution-list {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.distribution-list > div {
    display: grid;
    gap: 5px;
}

.distribution-list p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    font-size: 10px;
}

.distribution-list i {
    display: block;
    height: 7px;
    min-width: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff7b86, var(--red));
}

.logic-note {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dfe7f5;
    border-radius: 9px;
    color: #536076;
    background: #f6f9ff;
    font-size: 10px;
    line-height: 1.55;
}

.error-list {
    display: block;
    max-width: 380px;
    margin-top: 5px;
    color: #a61b2b;
    line-height: 1.45;
}

.error-preview-card {
    margin-top: 14px;
    padding-bottom: 12px;
}

.error-preview-card p {
    margin: 6px 14px;
    color: #a61b2b;
    font-size: 9px;
}

.state-pill.neutral {
    color: #475569;
    background: #eef2f7;
}

.kpi-filter-form {
    grid-template-columns: minmax(280px, 1fr) minmax(180px, .35fr) auto;
}

.purpose-cell {
    min-width: 280px;
    white-space: normal;
}

.kpi-data-table {
    min-width: 1380px;
}

@media (max-width: 1180px) {
    .side-oneflow-brand img { width: 128px; }
    .topbar { padding-left: 20px; }
    .descriptor-brand .brand-copy strong { max-width: 440px; }
}

@media (max-width: 850px) {
    .side-oneflow-brand img { width: 66px; }
    .descriptor-brand .brand-copy { display: grid; }
    .descriptor-brand .brand-copy strong { max-width: 310px; font-size: 11px; }
    .descriptor-brand .brand-copy small { font-size: 9px; }
    .import-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .preview-grid, .kpi-dashboard-grid, .status-distribution-grid { grid-template-columns: 1fr; }
    .four-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .heading-actions { width: 100%; margin: 10px 0 0; }
    .inner-page-heading { flex-wrap: wrap; }
}

@media (max-width: 620px) {
    .descriptor-brand .brand-copy strong { max-width: 200px; }
    .import-step-list, .four-columns { grid-template-columns: 1fr; }
    .kpi-filter-form { grid-template-columns: 1fr; }
}

/* ============================================================
   v1.1.0 - SOURCE DATA CENTER
   ============================================================ */

.source-center-heading {
    align-items: flex-start;
}

.source-action-bar {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.source-action-bar form {
    margin: 0;
}

.source-principle-banner,
.source-dashboard-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 12px 15px;
    border: 1px solid #dfe7f5;
    border-radius: 10px;
    color: #536076;
    background: #f7f9fd;
    font-size: 10px;
    line-height: 1.5;
}

.source-principle-banner strong,
.source-dashboard-note strong {
    flex: 0 0 auto;
    color: #202938;
}

.source-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0;
}

.source-config-card {
    overflow: hidden;
}

.source-config-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 68px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
}

.source-config-card > header > div {
    display: grid;
    gap: 4px;
}

.source-config-card > header strong {
    font-size: 13px;
}

.source-config-card > header span {
    color: var(--muted);
    font-size: 9px;
}

.source-config-card.source-disabled {
    background: #fafbfc;
}

.source-state-pill,
.run-status,
.current-run-tag {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .03em;
    white-space: nowrap;
}

.source-state-pill {
    padding: 5px 9px;
}

.source-state-pill.active,
.run-status.completed,
.current-run-tag {
    color: #0f7a43;
    background: #e8f8ef;
}

.source-state-pill.waiting,
.run-status.running {
    color: #8a5b00;
    background: #fff4cf;
}

.run-status.failed {
    color: #a61b2b;
    background: #ffe8eb;
}

.run-status {
    padding: 4px 8px;
}

.current-run-tag {
    margin-left: 6px;
    padding: 3px 7px;
}

.source-config-body {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.source-config-body > p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.source-config-body dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.source-config-body dl > div {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e6e9ef;
}

.source-config-body dt {
    color: var(--muted);
    font-size: 9px;
}

.source-config-body dd {
    min-width: 0;
    margin: 0;
    color: #252d3a;
    font-size: 9px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.source-path-form {
    display: grid;
    gap: 7px;
}

.source-path-form label {
    color: #3d4655;
    font-size: 9px;
    font-weight: 700;
}

.source-path-form > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.source-path-form input {
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #202938;
    background: #fff;
    font: inherit;
    font-size: 10px;
}

.source-wait-note {
    padding: 10px 12px;
    border: 1px solid #f1dfad;
    border-radius: 8px;
    color: #77520b;
    background: #fff9e9;
    font-size: 9px;
    line-height: 1.45;
}

.source-file-card,
.source-current-card,
.source-history-card {
    margin-top: 14px;
    overflow: hidden;
}

.source-file-card > header,
.source-current-card > header,
.source-history-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 62px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.source-file-card > header > div,
.source-current-card > header > div,
.source-history-card > header > div {
    display: grid;
    gap: 4px;
}

.source-file-card > header span,
.source-current-card > header span,
.source-history-card > header span {
    color: var(--muted);
    font-size: 9px;
}

.source-path-cell,
.source-message-cell {
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.table-subline {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
}

.source-history-card .oneflow-table {
    min-width: 1240px;
}

.source-current-card .oneflow-table {
    min-width: 980px;
}

.source-file-card .oneflow-table {
    min-width: 980px;
}

.source-metrics article strong {
    font-size: 23px;
}

.error-banner {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #f3c7ce;
    border-radius: 9px;
    color: #a61b2b;
    background: #fff0f2;
    font-size: 10px;
    line-height: 1.5;
}

.source-center-card {
    border-color: rgba(230, 0, 18, .16);
    background: linear-gradient(145deg, #fff, #fff7f8);
}

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

    .source-action-bar {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .source-principle-banner,
    .source-dashboard-note {
        align-items: flex-start;
        flex-direction: column;
    }

    .source-path-form > div,
    .source-config-body dl > div {
        grid-template-columns: 1fr;
    }
}

.source-kpi-table { min-width: 1780px; }
.six-columns { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .six-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .six-columns { grid-template-columns: 1fr; } }

/* v1.2.0 - period and KPI result */
.page-back-link {
    display: inline-flex;
    align-items: center;
    margin: 0 0 12px;
    color: #596273;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}
.page-back-link:hover { color: var(--red); }
.period-scope-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.period-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.period-filter-form label { font-size: 10px; font-weight: 800; }
.period-filter-form select {
    min-width: 112px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 11px;
}
.source-kpi-table td strong { white-space: nowrap; }
@media (max-width: 720px) {
    .period-scope-banner { align-items: flex-start; flex-direction: column; }
}

/* ============================================================
   v1.3.0 - KPI RESULT DASHBOARD + BA MASTER DATA
   ============================================================ */
.master-data-overview {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(150px, .75fr));
    gap: 12px;
    margin-bottom: 14px;
}
.master-source-card { overflow: hidden; }
.master-source-card > header { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.master-source-path {
    overflow: hidden; margin: 14px 16px 10px; padding: 11px 12px;
    border: 1px solid #e4e8ee; border-radius: 8px; background: #f8f9fb;
    color: #303a49; font-family: Consolas, monospace; font-size: 10px;
    text-overflow: ellipsis; white-space: nowrap;
}
.master-source-facts { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 0 16px 14px; color: var(--muted); font-size: 9px; }
.master-metric-card { display: grid; align-content: center; gap: 7px; min-height: 132px; padding: 18px; }
.master-metric-card span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.master-metric-card strong { font-size: 28px; line-height: 1; }
.master-metric-card small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.inline-table-search { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.inline-table-search input { width: 240px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.master-ba-table { min-width: 960px; }
.master-ba-table th:first-child, .master-ba-table td:first-child { width: 60px; text-align: center; }
.selected-ba-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin: 9px 0; }
.selected-ba-chip { padding: 5px 8px; border: 1px solid #ffcbd0; border-radius: 999px; color: var(--red); background: #fff3f4; font: inherit; font-size: 8px; font-weight: 700; cursor: pointer; }
.selected-ba-empty { color: var(--muted); font-size: 8px; }

.dashboard-filter-strip {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    margin-bottom: 12px; padding: 11px 14px; border: 1px solid #e5e9ef;
    border-radius: 10px; background: #f8f9fb;
}
.data-scope-copy { display: grid; gap: 3px; font-size: 9px; }
.data-scope-copy strong { color: #1f2937; }
.data-scope-copy span { color: var(--red); font-weight: 700; }
.dashboard-filter-form { display: flex; align-items: end; gap: 9px; }
.dashboard-filter-form label { display: grid; gap: 4px; min-width: 150px; color: var(--muted); font-size: 8px; }
.dashboard-filter-form select { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }

.kpi-metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.kpi-metric-grid article { display: grid; gap: 6px; min-height: 114px; align-content: center; padding: 14px; border: 1px solid #e5e9ef; border-radius: 11px; background: #fff; box-shadow: 0 4px 13px rgba(30,39,53,.035); }
.kpi-metric-grid span { color: var(--muted); font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.kpi-metric-grid strong { color: #1d2633; font-size: 20px; line-height: 1.18; }
.kpi-metric-grid small { color: var(--muted); font-size: 8px; line-height: 1.35; }

.dashboard-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.dashboard-chart-card { min-height: 300px; overflow: hidden; }
.dashboard-chart-card > header { min-height: 60px; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.dashboard-chart-card > header > div { display: grid; gap: 3px; }
.dashboard-chart-card > header strong { font-size: 11px; }
.dashboard-chart-card > header span { color: var(--muted); font-size: 8px; }
.horizontal-chart { display: grid; gap: 9px; padding: 15px; }
.chart-row { display: grid; grid-template-columns: minmax(78px, 120px) minmax(90px, 1fr) minmax(44px, 92px); align-items: center; gap: 9px; min-height: 24px; }
.chart-row > span { overflow: hidden; color: #4c5666; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.chart-row > b { overflow: hidden; color: #283241; font-size: 8px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.chart-track { height: 10px; overflow: hidden; border-radius: 999px; background: #f0f2f5; }
.chart-track i { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e60012, #ff6d78); }
.chart-track.secondary i { background: linear-gradient(90deg, #ffb3ba, #e60012); }
.chart-track.warning i { background: linear-gradient(90deg, #f5a524, #ffcc70); }
.chart-track.neutral i { background: linear-gradient(90deg, #667085, #b6beca); }
.dense-chart { gap: 7px; }
.dense-chart .chart-row { min-height: 20px; }
.trend-chart-wrap { padding: 14px 15px 10px; }
.trend-chart { display: block; width: 100%; height: 205px; overflow: visible; }
.trend-axis { stroke: #e2e6eb; stroke-width: 1; }
.trend-line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-point { fill: #fff; stroke: var(--red); stroke-width: 3; }
.trend-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }

.compact-kpi-table { width: 100%; min-width: 1530px; table-layout: fixed; }
.compact-kpi-table th, .compact-kpi-table td { height: 42px; padding: 8px 7px; font-size: 8px; white-space: nowrap; }
.compact-kpi-table th:nth-child(1), .compact-kpi-table td:nth-child(1) { width: 86px; }
.compact-kpi-table th:nth-child(2), .compact-kpi-table td:nth-child(2) { width: 138px; }
.compact-kpi-table th:nth-child(3), .compact-kpi-table td:nth-child(3), .compact-kpi-table th:nth-child(4), .compact-kpi-table td:nth-child(4) { width: 165px; }
.compact-kpi-table th:nth-child(5), .compact-kpi-table td:nth-child(5) { width: 95px; }
.compact-kpi-table th:nth-child(6), .compact-kpi-table td:nth-child(6), .compact-kpi-table th:nth-child(7), .compact-kpi-table td:nth-child(7) { width: 143px; }
.compact-kpi-table th:nth-child(8), .compact-kpi-table td:nth-child(8) { width: 118px; }
.compact-kpi-table th:nth-child(9), .compact-kpi-table td:nth-child(9), .compact-kpi-table th:nth-child(10), .compact-kpi-table td:nth-child(10) { width: 82px; }
.compact-kpi-table th:nth-child(11), .compact-kpi-table td:nth-child(11) { width: 70px; text-align: center; }
.compact-kpi-table th:nth-child(12), .compact-kpi-table td:nth-child(12) { width: 112px; text-align: right; }
.compact-kpi-table th:nth-child(13), .compact-kpi-table td:nth-child(13) { width: 260px; }
.compact-kpi-table th:nth-child(1), .compact-kpi-table td:nth-child(1) { position: sticky; left: 0; z-index: 2; background: #fff; }
.compact-kpi-table th:nth-child(2), .compact-kpi-table td:nth-child(2) { position: sticky; left: 86px; z-index: 2; background: #fff; box-shadow: 5px 0 7px rgba(31,41,55,.04); }
.compact-kpi-table thead th:nth-child(1), .compact-kpi-table thead th:nth-child(2) { z-index: 4; background: #f8f9fb; }
.ellipsis-cell, .purpose-cell { overflow: hidden; text-overflow: ellipsis; }
.kpi-result-cell { color: #b80010; background: #fff7f8; }
.amount-cell { font-variant-numeric: tabular-nums; }
.auto-cell { font-weight: 800; text-align: center; }
.kpi-result-table-card > header > small { color: var(--muted); font-size: 8px; }
.compact-result-filters { grid-template-columns: 150px minmax(230px, 1fr) 210px 110px auto; }
.compact-pagination { align-items: center; }
.compact-pagination > span { padding: 0 4px; color: var(--muted); }
.dashboard-latest-table { margin-bottom: 14px; }

@media (max-width: 1380px) {
    .kpi-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .master-data-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .master-source-card { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
    .dashboard-chart-grid { grid-template-columns: 1fr; }
    .dashboard-filter-strip, .dashboard-filter-form { align-items: stretch; flex-direction: column; }
    .kpi-metric-grid, .master-data-overview { grid-template-columns: 1fr 1fr; }
    .compact-result-filters { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .kpi-metric-grid, .master-data-overview { grid-template-columns: 1fr; }
    .chart-row { grid-template-columns: 76px minmax(70px, 1fr) 70px; }
}

/* ============================================================
   v1.4.0 - KPI target, summary-first UX and EN/VI UI switch
   ============================================================ */
.language-switcher { display:flex; align-items:center; gap:2px; padding:3px; border:1px solid #dfe3e9; border-radius:9px; background:#fff; }
.language-switcher button { min-width:31px; height:27px; border:0; border-radius:6px; color:#667085; background:transparent; font-size:10px; font-weight:800; cursor:pointer; }
.language-switcher button.active { color:#fff; background:var(--red); }
.kpi-status-filter-bar { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.kpi-status-filter-bar a { display:inline-flex; align-items:center; gap:9px; min-height:38px; padding:7px 12px; border:1px solid #e1e5eb; border-radius:10px; color:#4d5665; background:#fff; font-size:10px; font-weight:700; text-decoration:none; }
.kpi-status-filter-bar a b { display:grid; min-width:23px; height:23px; place-items:center; padding:0 6px; border-radius:12px; color:#344054; background:#f2f4f7; font-size:9px; }
.kpi-status-filter-bar a:hover, .kpi-status-filter-bar a.active { border-color:rgba(230,0,18,.24); color:var(--red); background:#fff5f6; }
.kpi-status-filter-bar a.pass.active { color:#138a45; border-color:rgba(19,138,69,.25); background:#effaf3; }
.kpi-status-filter-bar a.fail.active { color:#d92d20; border-color:rgba(217,45,32,.25); background:#fff1f0; }
.kpi-status-filter-bar a.missing.active { color:#6b7280; border-color:#d0d5dd; background:#f7f8fa; }
.kpi-metric-grid-v140 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.dashboard-chart-grid-v140 { align-items:stretch; }
.status-donut-body { display:grid; grid-template-columns:190px 1fr; gap:22px; align-items:center; min-height:245px; padding:18px; }
.status-donut { display:grid; width:168px; height:168px; place-items:center; margin:auto; border-radius:50%; background:conic-gradient(#19a85b 0 var(--pass-angle), #e60012 var(--pass-angle) 360deg); position:relative; }
.status-donut::after { content:""; position:absolute; inset:24px; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 1px #edf0f4; }
.status-donut > div { position:relative; z-index:1; display:grid; gap:3px; text-align:center; }
.status-donut strong { font-size:25px; color:#1d2633; }
.status-donut span { color:#667085; font-size:9px; font-weight:700; text-transform:uppercase; }
.status-donut-legend { display:grid; gap:12px; }
.status-donut-legend > div { display:grid; grid-template-columns:12px 1fr auto; align-items:center; gap:9px; font-size:10px; }
.status-donut-legend i { width:10px; height:10px; border-radius:50%; }
.pass-dot { background:#19a85b; } .fail-dot { background:#e60012; } .missing-dot { background:#c7cdd6; }
.status-donut-legend b { font-size:13px; }
.status-donut-legend small { color:#667085; font-size:9px; }
.detail-cta-card { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 22px; margin-bottom:15px; }
.detail-cta-card > div { display:grid; gap:5px; }
.detail-cta-card strong { font-size:14px; }
.detail-cta-card span { color:#667085; font-size:10px; }
/* Bigger detail typography. Important columns remain compact and close together. */
.compact-kpi-table { min-width:1710px; }
.compact-kpi-table th, .compact-kpi-table td { height:46px; padding:9px 8px; font-size:10.5px; line-height:1.25; }
.compact-kpi-table th { font-size:8.5px; }
.compact-kpi-table th:nth-child(1), .compact-kpi-table td:nth-child(1) { width:68px; }
.compact-kpi-table th:nth-child(2), .compact-kpi-table td:nth-child(2) { width:128px; }
.compact-kpi-table th:nth-child(3), .compact-kpi-table td:nth-child(3), .compact-kpi-table th:nth-child(4), .compact-kpi-table td:nth-child(4) { width:150px; }
.compact-kpi-table th:nth-child(5), .compact-kpi-table td:nth-child(5) { width:88px; }
.compact-kpi-table th:nth-child(6), .compact-kpi-table td:nth-child(6), .compact-kpi-table th:nth-child(7), .compact-kpi-table td:nth-child(7) { width:137px; }
.compact-kpi-table th:nth-child(8), .compact-kpi-table td:nth-child(8) { width:108px; }
.compact-kpi-table th:nth-child(9), .compact-kpi-table td:nth-child(9) { width:105px; }
.compact-kpi-table th:nth-child(10), .compact-kpi-table td:nth-child(10), .compact-kpi-table th:nth-child(11), .compact-kpi-table td:nth-child(11) { width:72px; }
.compact-kpi-table th:nth-child(12), .compact-kpi-table td:nth-child(12) { width:48px; text-align:center; }
.compact-kpi-table th:nth-child(13), .compact-kpi-table td:nth-child(13) { width:112px; text-align:right; }
.compact-kpi-table th:nth-child(14), .compact-kpi-table td:nth-child(14) { width:280px; }
.compact-kpi-table th:nth-child(2), .compact-kpi-table td:nth-child(2) { left:68px; }
.kpi-status-badge { display:inline-flex; align-items:center; justify-content:center; min-height:25px; padding:4px 7px; border-radius:7px; font-size:8px; font-weight:800; white-space:nowrap; }
.kpi-status-badge.pass { color:#087443; background:#e9f8ef; }
.kpi-status-badge.fail { color:#c81717; background:#fff0f0; }
.kpi-status-badge.missing { color:#667085; background:#f1f3f6; }
@media (max-width:1180px) { .kpi-metric-grid-v140 { grid-template-columns:repeat(2,minmax(0,1fr)); } .status-donut-body { grid-template-columns:1fr; } }
@media (max-width:720px) { .language-switcher { display:none; } .kpi-metric-grid-v140 { grid-template-columns:1fr; } .detail-cta-card { align-items:flex-start; flex-direction:column; } }

/* ============================================================
   v1.5.0 - KPI visual hierarchy + compact header + scope isolation
   ============================================================ */
.kpi-status-filter-bar { gap: 6px; margin: 10px 0; }
.kpi-status-filter-bar a {
    min-height: 32px;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 9px;
}
.kpi-status-filter-bar a b {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 8px;
}

.kpi-metric-grid-v150 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0 13px;
}
.kpi-metric-grid-v150 article {
    min-height: 86px;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(30,39,53,.025);
}
.kpi-metric-grid-v150 span { font-size: 7px; }
.kpi-metric-grid-v150 strong { font-size: 16px; line-height: 1.12; }
.kpi-metric-grid-v150 small { font-size: 7.5px; }

.dashboard-chart-grid-v140 { gap: 14px; }
.dashboard-chart-grid-v140 > .dashboard-chart-card:nth-child(-n+2) {
    min-height: 330px;
    border-color: #dde3ea;
    box-shadow: 0 8px 24px rgba(30,39,53,.045);
}
.status-donut-body { min-height: 265px; padding: 20px 22px; }
.status-donut { width: 178px; height: 178px; }
.status-donut strong { font-size: 27px; }
.status-donut-legend > div { font-size: 10.5px; }
.status-donut-legend b { min-width: 34px; font-size: 16px; text-align: right; }
.emphasized-values .chart-row { min-height: 31px; }
.emphasized-values .chart-row > span { font-size: 9px; }
.emphasized-values .chart-row > b { min-width: 36px; color: #111827; font-size: 12px; font-weight: 900; }
.emphasized-values .chart-track { height: 12px; }

/* Header controls are intentionally secondary to the dashboard. */
.topbar-user-zone { gap: 8px; }
.notification-button { width: 34px; height: 34px; padding: 7px; }
.notification-button svg { width: 20px; height: 20px; }
.notification-button span { top: 0; right: 0; width: 15px; height: 15px; font-size: 8px; }
.language-switcher { padding: 2px; border-radius: 8px; }
.language-switcher button { min-width: 27px; height: 24px; border-radius: 5px; font-size: 8px; }
.user-summary { gap: 8px; }
.user-avatar { width: 38px; height: 38px; font-size: 12px; }
.user-copy { gap: 1px; max-width: 175px; }
.user-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.user-copy small { font-size: 9px; }
.topbar-divider { height: 34px; }
.password-button, .logout-button {
    min-height: 38px;
    gap: 6px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: 10px;
}
.password-button svg, .logout-button svg { width: 16px; height: 16px; }

@media (max-width: 1180px) {
    .kpi-metric-grid-v150 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-copy { display: none; }
}
@media (max-width: 720px) {
    .kpi-metric-grid-v150 { grid-template-columns: 1fr; }
}


/* ============================================================
   v1.6.0 - KPI RESULT COMPLETION
   ============================================================ */
.shell-header { min-height: 68px; }
.side-brand-zone { min-height: 68px; }
.side-oneflow-brand img { max-height: 42px; }
.topbar { min-height: 68px; padding-top: 0; padding-bottom: 0; }
.shell-main { min-height: calc(100vh - 109px); }
.sidebar-nav { top: 68px; }
.topbar-user-zone { gap: 6px; }
.notification-button { width: 31px; height: 31px; padding: 6px; }
.user-avatar { width: 34px; height: 34px; }
.password-button, .logout-button { min-height: 33px; padding: 0 9px; }
.topbar-divider { height: 30px; }

.kpi-metric-grid-v150 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.kpi-metric-grid-v150 article { min-height: 72px; padding: 8px 9px; }
.kpi-metric-grid-v150 strong { font-size: 15px; }
.kpi-metric-grid-v150 small { min-height: 10px; }

.status-legend-link {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 5px 7px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: 140ms ease;
}
.status-legend-link:hover { background: #f6f7f9; transform: translateX(2px); }
.status-legend-link.fail:hover { background: #fff1f1; }
.status-legend-link.missing:hover { background: #f1f3f6; }
.status-donut-legend > .status-legend-link { font-size: 10.5px; }
.status-donut-legend > .status-legend-link b { min-width: 34px; font-size: 16px; text-align: right; }

.chart-drilldown-link { color: inherit; text-decoration: none; border-radius: 7px; padding: 2px 4px; }
.chart-drilldown-link:hover { background: #fff5f6; }

.detailed-kpi-table { min-width: 2380px; }
.kpi-target-cell { text-align: center; white-space: nowrap; }
.kpi-variance-cell { min-width: 125px; white-space: nowrap; }
.kpi-variance-cell.over { color: #c81717; font-weight: 800; }
.error-reason-cell { max-width: 220px; color: #9a3412; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1500px) {
    .kpi-metric-grid-v150 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .kpi-metric-grid-v150 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .kpi-metric-grid-v150 { grid-template-columns: 1fr; }
}


/* ============================================================
   v1.7.0 - KPI STATUS AND ALERT DRAFT ENGINE (BASE)
   ============================================================ */
.kpi-status-heading { margin-bottom: 12px; }
.status-time-banner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--line);
}
.status-time-banner > div { display: grid; gap: 4px; padding: 11px 14px; background: #fff; }
.status-time-banner span { color: var(--muted); font-size: 9px; }
.status-time-banner strong { font-size: 11px; }
.status-filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }
.status-filter-tabs a { display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; color: #354052; background: #fff; text-decoration: none; font-size: 10px; font-weight: 700; }
.status-filter-tabs a b { display: grid; min-width: 25px; height: 21px; place-items: center; border-radius: 11px; background: #f1f3f6; font-size: 9px; }
.status-filter-tabs a.active { border-color: rgba(230,0,18,.25); color: var(--red); background: var(--red-soft); }
.status-filter-tabs a.warning.active { color: #a15c00; background: #fff5dc; border-color: #f1c765; }
.status-filter-tabs a.danger.active { color: #b42318; background: #fff0f0; border-color: #f4aaaa; }
.status-metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.status-metric-grid article { display: grid; gap: 5px; min-height: 86px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.status-metric-grid span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-metric-grid strong { font-size: 18px; }
.status-metric-grid small { color: var(--muted); font-size: 8px; }
.status-metric-grid article.warning { background: #fffbef; }
.status-metric-grid article.danger { background: #fff5f5; }
.status-dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact-empty { min-height: 360px; }
.status-detail-table { min-width: 2100px; }
.status-pill.ontime { color: #067647; background: #ecfdf3; }
.status-pill.warning { color: #9a6700; background: #fff7d6; }
.status-pill.overdue { color: #b42318; background: #fee4e2; }
.status-pill.missing { color: #475467; background: #eef1f5; }
.status-pill.open { color: #067647; background: #ecfdf3; }
.status-pill.closed { color: #475467; background: #eef1f5; }
.text-danger { color: #b42318; font-weight: 800; }
.table-subline { display: block; color: var(--muted); font-size: 8px; }
@media (max-width: 1200px) {
    .status-metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .status-time-banner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .status-metric-grid, .status-dashboard-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   v1.8.0 - KPI STATUS CACHE, FAST FILTERS AND DRILL-DOWN DONUT
   ============================================================ */
.status-time-banner-v180 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.source-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}
.source-stat-strip article {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
}
.source-stat-strip span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.source-stat-strip strong { font-size: 16px; }
.status-metric-link { color: inherit; text-decoration: none; }
.status-metric-link article { height: 100%; transition: 140ms ease; }
.status-metric-link:hover article { transform: translateY(-2px); border-color: rgba(230,0,18,.26); box-shadow: 0 8px 20px rgba(30,39,53,.06); }
.status-composition-card { min-height: 330px; }
.status-composition-body {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 260px;
    padding: 16px 20px 20px;
}
.status-svg-donut-wrap { position: relative; width: 190px; height: 190px; margin: auto; }
.status-svg-donut { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.status-donut-base { fill: none; stroke: #edf0f4; stroke-width: 18; }
.status-donut-segment {
    fill: none;
    stroke-width: 18;
    stroke-linecap: butt;
    cursor: pointer;
    transition: stroke-width 140ms ease, opacity 140ms ease;
}
.status-donut-segment:hover { stroke-width: 22; opacity: .88; }
.status-donut-segment.status-ontime { stroke: #19a85b; }
.status-donut-segment.status-warning { stroke: #f2a900; }
.status-donut-segment.status-overdue { stroke: #e60012; }
.status-donut-segment.status-missing { stroke: #aeb7c4; }
.status-donut-center {
    position: absolute;
    inset: 39px;
    display: grid;
    place-content: center;
    gap: 4px;
    border-radius: 50%;
    text-align: center;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf0f4;
    pointer-events: none;
}
.status-donut-center strong { color: #172033; font-size: 30px; line-height: 1; }
.status-donut-center span { max-width: 92px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.status-composition-legend { display: grid; gap: 8px; }
.status-composition-link {
    display: grid;
    grid-template-columns: 12px minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 8px;
    color: #344054;
    text-decoration: none;
    transition: 140ms ease;
}
.status-composition-link:hover { transform: translateX(2px); background: #f7f8fa; }
.status-composition-link i { width: 11px; height: 11px; border-radius: 50%; }
.status-composition-link.ontime i { background: #19a85b; }
.status-composition-link.warning i { background: #f2a900; }
.status-composition-link.overdue i { background: #e60012; }
.status-composition-link.missing i { background: #aeb7c4; }
.status-composition-link span { display: grid; gap: 2px; font-size: 10px; font-weight: 800; }
.status-composition-link small { color: var(--muted); font-size: 8px; font-weight: 600; }
.status-composition-link b { min-width: 42px; text-align: right; font-size: 18px; }
@media (max-width: 1280px) {
    .status-time-banner-v180, .source-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .status-composition-body { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .status-time-banner-v180, .source-stat-strip { grid-template-columns: 1fr; }
}

/* ==============================================================
   v1.9.0 UI & BRAND FOUNDATION
   Shared filter, action, table and VSS OneFlow brand components.
   ============================================================== */
:root {
    --ui-control-height: 36px;
    --ui-radius: 10px;
    --ui-card-padding: 14px 16px;
    --ui-control-border: #dce2ea;
    --ui-label: #667085;
}

.side-oneflow-brand img {
    width: 164px;
    max-width: 100%;
    height: auto;
}

.login-wordmark-image { width: 255px; }
.core-wordmark-image { width: 230px; }
.password-wordmark-image { width: 245px; }

.ui-page-heading {
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 14px;
}

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

.ui-heading-actions form { margin: 0; }

.ui-action {
    min-height: var(--ui-control-height) !important;
    height: var(--ui-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    line-height: 1;
    white-space: nowrap;
}

.ui-apply-button {
    min-width: 78px;
    box-shadow: none !important;
}

.ui-filter-card {
    display: grid;
    grid-template-columns: minmax(190px, .7fr) minmax(0, 2.3fr);
    gap: 18px;
    align-items: end;
    margin: 12px 0 14px;
    padding: var(--ui-card-padding);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20, 30, 50, .035);
}

.ui-filter-meta {
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
}

.ui-filter-meta span {
    color: var(--ui-label);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ui-filter-meta strong {
    overflow: hidden;
    color: #172033;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ui-filter-meta small {
    color: #98a2b3;
    font-size: 8px;
}

.ui-filter-form {
    display: grid;
    gap: 9px;
    align-items: end;
    min-width: 0;
}

.ui-filter-form-dashboard {
    grid-template-columns: repeat(4, minmax(125px, 1fr)) auto;
}

.ui-filter-form-details {
    grid-template-columns: minmax(240px, 1.65fr) repeat(4, minmax(120px, .72fr)) 82px auto;
}

.ui-filter-form label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.ui-filter-form label > span {
    color: var(--ui-label);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .025em;
}

.ui-filter-form input,
.ui-filter-form select {
    width: 100%;
    min-width: 0;
    height: var(--ui-control-height);
    padding: 0 10px;
    border: 1px solid var(--ui-control-border);
    border-radius: 8px;
    color: #172033;
    background: #fff;
    font: inherit;
    font-size: 10px;
    outline: none;
}

.ui-filter-form input:focus,
.ui-filter-form select:focus {
    border-color: rgba(230, 0, 18, .42);
    box-shadow: 0 0 0 3px rgba(230, 0, 18, .07);
}

.ui-filter-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ui-metric-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}
.ui-metric-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ui-metric-grid article {
    display: grid;
    gap: 5px;
    min-height: 88px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}
.ui-metric-grid article span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ui-metric-grid article strong { font-size: 19px; }
.ui-metric-grid article small { color: var(--muted); font-size: 8px; }
.ui-metric-grid article.metric-success { background: #f4fcf7; }
.ui-metric-grid article.metric-warning { background: #fffbef; }
.ui-metric-grid article.metric-danger { background: #fff5f5; }

.ui-table-card > header {
    align-items: center;
    padding: 13px 16px;
}
.ui-table-card > header > div { display: grid; gap: 3px; }
.ui-data-table { font-size: 10px; }
.ui-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 9px;
    color: #344054;
    background: #f7f8fa;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}
.ui-data-table tbody td { padding: 9px; vertical-align: top; }

/* KPI Status filter/layout cleanup */
.kpi-status-scope-filter {
    margin-top: 10px;
}
.kpi-status-scope-filter .ui-filter-form-dashboard {
    grid-template-columns: minmax(180px, 240px) auto;
    justify-content: end;
}
.kpi-status-details-filter .ui-filter-form-details {
    grid-template-columns: minmax(270px, 1.7fr) repeat(3, minmax(130px, .72fr)) 82px auto;
}
.status-detail-table { min-width: 1750px !important; }
.status-detail-table th:first-child,
.status-detail-table td:first-child { position: sticky; left: 0; z-index: 3; background: #fff; }
.status-detail-table th:nth-child(2),
.status-detail-table td:nth-child(2) { position: sticky; left: 52px; z-index: 3; background: #fff; }
.status-detail-table thead th:first-child,
.status-detail-table thead th:nth-child(2) { background: #f7f8fa; }

/* E-Invoice Monitor */
.einvoice-view-note {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 12px;
    padding: 10px 13px;
    border: 1px solid #e7ebf1;
    border-radius: 9px;
    color: #596273;
    background: #f9fafb;
    font-size: 9px;
}
.einvoice-view-note strong { color: #172033; }
.einvoice-dashboard-grid { align-items: stretch; }
.einvoice-composition-body {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    align-items: center;
    min-height: 270px;
    padding: 18px 20px;
}
.einvoice-donut {
    position: relative;
    display: grid;
    width: 178px;
    height: 178px;
    place-items: center;
    margin: auto;
    border-radius: 50%;
    background: var(--donut-gradient, conic-gradient(#e9edf2 0 100%));
}
.einvoice-donut::after {
    content: "";
    position: absolute;
    inset: 25px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf0f4;
}
.einvoice-donut > div { position: relative; z-index: 1; display: grid; gap: 3px; text-align: center; }
.einvoice-donut strong { font-size: 29px; }
.einvoice-donut span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.status-composition-link.green i { background: #19a85b; }
.status-composition-link.blue i { background: #2878d4; }
.status-composition-link.warning i { background: #f2a900; }
.status-composition-link.danger i { background: #e60012; }
.status-composition-link.neutral i { background: #aeb7c4; }
.source-status-list { display: grid; gap: 10px; padding: 17px; }
.source-status-list div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 9px; border-bottom: 1px dashed #e6e9ee; }
.source-status-list div:last-child { border-bottom: 0; }
.source-status-list dt { color: var(--muted); font-size: 9px; }
.source-status-list dd { margin: 0; color: #172033; font-size: 11px; font-weight: 800; }
.einvoice-detail-table { min-width: 1900px; }
.einvoice-detail-table th:first-child,
.einvoice-detail-table td:first-child { position: sticky; left: 0; z-index: 3; background: #fff; }
.einvoice-detail-table th:nth-child(2),
.einvoice-detail-table td:nth-child(2) { position: sticky; left: 54px; z-index: 3; background: #fff; }
.einvoice-detail-table thead th:first-child,
.einvoice-detail-table thead th:nth-child(2) { background: #f7f8fa; }
.reconciliation-badge,
.severity-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
}
.reconciliation-badge { color: #344054; background: #f2f4f7; }
.result-matched_same_period { color: #067647; background: #ecfdf3; }
.result-matched_later_period,
.result-matched_prior_invoice { color: #175cd3; background: #eff8ff; }
.result-e_invoice_not_in_summary,
.result-summary_not_in_e_invoice { color: #9a6700; background: #fff7d6; }
.result-amount_mismatch { color: #b42318; background: #fee4e2; }
.result-multiple_match { color: #6941c6; background: #f4f3ff; }
.severity-info { color: #067647; background: #ecfdf3; }
.severity-warning { color: #9a6700; background: #fff7d6; }
.severity-error { color: #b42318; background: #fee4e2; }
.ui-detail-cta { margin-top: 14px; }

@media (max-width: 1380px) {
    .ui-filter-form-dashboard { grid-template-columns: repeat(2, minmax(140px, 1fr)) auto; }
    .ui-filter-form-details { grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, 1fr)); }
    .ui-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .ui-metric-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .ui-filter-card { grid-template-columns: 1fr; align-items: stretch; }
    .ui-filter-form-dashboard,
    .ui-filter-form-details,
    .kpi-status-scope-filter .ui-filter-form-dashboard,
    .kpi-status-details-filter .ui-filter-form-details { grid-template-columns: 1fr 1fr; }
    .ui-search-field { grid-column: 1 / -1; }
    .ui-filter-actions { justify-content: stretch; }
    .ui-filter-actions > * { flex: 1; }
    .ui-metric-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .einvoice-composition-body { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .ui-filter-form-dashboard,
    .ui-filter-form-details,
    .kpi-status-scope-filter .ui-filter-form-dashboard,
    .kpi-status-details-filter .ui-filter-form-details { grid-template-columns: 1fr; }
    .ui-metric-grid-6 { grid-template-columns: 1fr; }
    .ui-heading-actions { justify-content: flex-start; }
    .ui-action { flex: 1 1 auto; }
}

/* v1.9.1 - approved logo fidelity hotfix.
   The normal wordmark contains the exact approved white artwork background,
   so the brand zone remains pure white on every internal page. */
.side-brand-zone,
.side-oneflow-brand {
    background: #ffffff;
}


/* v1.9.3 - E-Invoice module split */
.einvoice-module-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
    padding: 6px;
    border: 1px solid var(--line, #dfe5ec);
    border-radius: 14px;
    background: #f7f9fc;
}
.einvoice-module-tabs a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 52px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #172033;
    text-decoration: none;
    background: transparent;
}
.einvoice-module-tabs a span {
    color: #667085;
    font-size: 12px;
    text-align: right;
}
.einvoice-module-tabs a.active {
    border-color: #ffd1da;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20, 32, 51, 0.06);
}
.einvoice-module-tabs a.active strong { color: #e60012; }
.einvoice-module-tabs.compact-tabs { max-width: 720px; }
.einvoice-quick-stack { position: relative; z-index: 3; }
@media (max-width: 760px) {
    .einvoice-module-tabs { grid-template-columns: 1fr; }
    .einvoice-module-tabs a span { text-align: left; }
}

/* v1.9.4 - distinct quick-action icons and reconciliation hierarchy */
.mini-svg-icon {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border-radius: 9px;
}
.mini-svg-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tracking-mini { color: #e60012; background: #fff0f3; }
.reconciliation-mini { color: #175cd3; background: #eff8ff; }
.result-mini { color: #067647; background: #ecfdf3; }
.status-mini { color: #b54708; background: #fff4e5; }
.ui-metric-grid-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.status-composition-link.orange i { background: #f97316; }
.status-composition-link.purple i { background: #7f56d9; }
.result-matched_different_period { color: #175cd3; background: #eff8ff; }
.result-invoice_info_mismatch { color: #9a6700; background: #fff7d6; }
.result-payment_more { color: #b42318; background: #fee4e2; }
.result-payment_less { color: #b54708; background: #fff4e5; }
.result-manual_review { color: #6941c6; background: #f4f3ff; }
@media (max-width: 1600px) { .ui-metric-grid-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ui-metric-grid-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ui-metric-grid-8 { grid-template-columns: 1fr; } }

.metric-card-link{display:flex;flex-direction:column;text-decoration:none;color:inherit;min-width:0}.metric-mini-track{display:block;height:6px;background:#e9edf2;border-radius:999px;overflow:hidden;margin-top:auto}.metric-mini-track b{display:block;height:100%;min-width:0;background:#e60012;border-radius:999px}.metric-success .metric-mini-track b{background:#19a85b}.metric-warning .metric-mini-track b{background:#f2a900}.metric-danger .metric-mini-track b{background:#e60012}.range-filter-form{align-items:end}.monthly-column-chart{height:250px;display:flex;align-items:end;gap:12px;padding:20px 8px 8px;overflow-x:auto}.month-column{min-width:52px;display:grid;grid-template-rows:180px auto auto;gap:5px;text-align:center}.month-bars{display:flex;align-items:end;justify-content:center;gap:3px;height:180px;border-bottom:1px solid #d9e0ea}.month-bars i{width:10px;min-height:2px;border-radius:5px 5px 0 0}.month-bars .matched{background:#19a85b}.month-bars .issues{background:#f2a900}.month-bars .unmatched{background:#aeb7c4}.month-column span{font-size:11px;color:#64748b}.month-column b{font-size:12px}.trend-card{min-width:0}@media(max-width:900px){.range-filter-form{grid-template-columns:1fr 1fr}.monthly-column-chart{height:220px}}

/* v1.10.1 - E-Invoice metric-card compact hotfix.
   Scoped to E-Invoice so KPI and administration layouts remain unchanged. */
.einvoice-metric-grid .metric-card-link {
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 6px;
    min-height: 72px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    transition: 140ms ease;
}
.einvoice-metric-grid .metric-card-link:hover {
    transform: translateY(-1px);
    border-color: rgba(230, 0, 18, .22);
    box-shadow: 0 6px 16px rgba(20, 32, 51, .05);
}
.einvoice-metric-grid .metric-card-link.metric-success { background: #f4fcf7; }
.einvoice-metric-grid .metric-card-link.metric-warning { background: #fffbef; }
.einvoice-metric-grid .metric-card-link.metric-danger { background: #fff5f5; }
.einvoice-metric-grid .metric-card-label {
    display: -webkit-box;
    min-height: 22px;
    overflow: hidden;
    color: #596273;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.einvoice-metric-grid .metric-card-value-line {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #172033;
    line-height: 1;
}
.einvoice-metric-grid .metric-card-value-line strong { font-size: 16px; }
.einvoice-metric-grid .metric-card-value-line small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}
.einvoice-metric-grid .metric-mini-track {
    width: 68px;
    max-width: 58%;
    height: 3px;
    margin-top: 1px;
}

/* ============================================================
   v1.10.4 - UI REFINEMENT: MOBILE LOGIN + SHELL TONE
   Scope is visual only. No business logic or data behavior.
   ============================================================ */

:root {
    --oneflow-sidebar-bg-top: #eef1f5;
    --oneflow-sidebar-bg-bottom: #e9edf2;
    --oneflow-brand-zone-bg-top: #eef1f5;
    --oneflow-brand-zone-bg-bottom: #e9edf2;
    --oneflow-floating-divider: #cbd2dc;
}

/* Internal shell: retain the approved structure, only refine tone. */
.side-brand-zone {
    position: relative;
    border-right: 0;
    background: linear-gradient(
        180deg,
        var(--oneflow-brand-zone-bg-top) 0%,
        var(--oneflow-brand-zone-bg-bottom) 100%
    );
}

.side-brand-zone::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -1px;
    width: 1px;
    height: 32px;
    border-radius: 999px;
    background: var(--oneflow-floating-divider);
    transform: translateY(-50%);
}

.side-oneflow-brand {
    background: transparent;
}

.sidebar {
    background: linear-gradient(
        180deg,
        var(--oneflow-sidebar-bg-top) 0%,
        var(--oneflow-sidebar-bg-bottom) 100%
    );
}

.sidebar-collapse {
    border-top-color: #d8dde5;
}

.descriptor-brand .brand-copy strong {
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.descriptor-brand .brand-copy small {
    color: #778191;
}

/* Login: make the hero more compact and keep the form prominent. */
.login-shell {
    grid-template-columns: minmax(0, 46%) minmax(430px, 54%);
}

.login-showcase {
    padding: 36px 44px 26px;
    background:
        radial-gradient(circle at 72% 36%, rgba(230, 0, 18, 0.045), transparent 23rem),
        linear-gradient(180deg, #f3f5f8 0%, #eef1f5 100%);
}

.login-wordmark-image {
    width: min(238px, 70%);
}

.login-showcase h1 {
    max-width: 610px;
    margin-top: 26px;
    color: #3f4856;
    font-size: clamp(24px, 2vw, 33px);
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.025em;
    white-space: normal;
}

.login-org {
    margin-top: 16px;
    color: #606a79;
    font-size: 15px;
}

.login-accent-line {
    width: 50px;
    height: 3px;
    margin-top: 18px;
}

.platform-illustration {
    position: relative;
    inset: auto;
    width: 100%;
    height: 400px;
    margin-top: 18px;
    transform: none;
}

.feature-node {
    width: 76px;
    min-height: 82px;
    padding: 10px 7px;
    border-radius: 14px;
}

.feature-node svg {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
}

.feature-node strong {
    font-size: 10px;
    line-height: 1.18;
}

.platform-core {
    width: 146px;
    height: 126px;
    padding-top: 36px;
    border-radius: 23px;
    box-shadow:
        0 14px 0 #ffccd1,
        0 23px 0 #ffffff,
        0 31px 0 #ffdde1,
        0 36px 28px rgba(230, 0, 18, 0.19);
}

.core-wordmark-image {
    width: 99px;
}

.core-icons {
    gap: 24px;
    margin-top: 16px;
}

.core-icons svg {
    width: 23px;
    height: 23px;
}

.login-form-area {
    padding: 36px 42px;
}

.signin-card {
    width: min(490px, 100%);
    padding: 42px 40px 38px;
}

.signin-lock {
    width: 70px;
    height: 70px;
    margin-bottom: 18px;
}

.signin-lock svg {
    width: 32px;
    height: 32px;
}

.signin-card h2 {
    font-size: 26px;
}

.signin-card > p {
    margin: 10px 0 30px;
}

@media (max-width: 1180px) {
    .login-shell {
        grid-template-columns: minmax(0, 43%) minmax(410px, 57%);
    }

    .login-showcase {
        padding: 32px 30px 24px;
    }

    .login-wordmark-image {
        width: min(215px, 72%);
    }

    .login-showcase h1 {
        font-size: clamp(23px, 2.25vw, 29px);
    }

    .platform-illustration {
        height: 370px;
        margin-top: 14px;
    }

    .login-form-area {
        padding: 30px;
    }
}

/* Tablet and phone: show the sign-in form first, then the compact showcase. */
@media (max-width: 850px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-form-area {
        order: 1;
        padding: 28px 20px;
    }

    .login-showcase {
        order: 2;
        min-height: 430px;
        padding: 26px 28px 20px;
    }

    .login-wordmark-image {
        width: min(205px, 64%);
    }

    .login-showcase h1 {
        margin-top: 20px;
        font-size: 24px;
    }

    .login-org {
        margin-top: 12px;
        font-size: 14px;
    }

    .login-accent-line {
        margin-top: 14px;
    }

    .platform-illustration {
        width: 116%;
        height: 285px;
        margin: 12px 0 0 -8%;
        transform: scale(0.86);
        transform-origin: center top;
    }
}

@media (max-width: 680px) {
    .login-form-area {
        padding: 18px 12px 22px;
    }

    .signin-card {
        padding: 28px 20px 26px;
        border-radius: 12px;
    }

    .signin-lock {
        width: 58px;
        height: 58px;
        margin-bottom: 14px;
    }

    .signin-lock svg {
        width: 27px;
        height: 27px;
    }

    .signin-card h2 {
        font-size: 23px;
    }

    .signin-card > p {
        margin: 8px 0 23px;
        font-size: 13px;
    }

    .signin-form {
        gap: 17px;
    }

    .input-shell {
        min-height: 54px;
    }

    .input-shell input {
        height: 52px;
    }

    .signin-button {
        min-height: 56px;
        font-size: 16px;
    }

    .login-showcase {
        min-height: 360px;
        padding: 22px 20px 14px;
    }

    .login-wordmark-image {
        width: 185px;
    }

    .login-showcase h1 {
        margin-top: 17px;
        font-size: 21px;
        line-height: 1.28;
    }

    .platform-illustration {
        width: 154%;
        height: 235px;
        margin-left: -27%;
        transform: scale(0.68);
        transform-origin: center top;
    }
}

@media (max-width: 820px) {
    .side-brand-zone::after {
        height: 26px;
    }
}
