@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&family=Sora:wght@600;700;800&display=swap");

:root {
    color-scheme: dark;
    --bg: #030916;
    --bg-soft: #08152f;
    --bg-accent: #102753;
    --surface: rgba(14, 27, 52, 0.88);
    --surface-strong: #13284d;
    --ink: #edf3ff;
    --muted: #a7b9d9;
    --accent: #4f8cff;
    --accent-dark: #2f6fe6;
    --accent-contrast: #f4f8ff;
    --danger: #ff8d98;
    --danger-soft: #3c202c;
    --warning-bg: #3a2a0d;
    --warning-line: #8e6620;
    --warning-text: #f7da9e;
    --auth-btn-top: #92a9cb;
    --auth-btn-mid: #667d9f;
    --auth-btn-bottom: #465a7a;
    --auth-btn-border: #7f97b8;
    --auth-btn-text: #edf3ff;
    --auth-btn-depth: #344662;
    --auth-btn-glow: rgba(10, 22, 44, 0.35);
    --line: #2a436e;
    --line-strong: #4669a8;
    --shadow: 0 22px 54px rgba(1, 5, 12, 0.58);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink);
    position: relative;
    background:
        radial-gradient(
            circle at 8% 12%,
            rgba(70, 122, 255, 0.28) 0%,
            transparent 36%
        ),
        radial-gradient(
            circle at 84% 88%,
            rgba(42, 95, 217, 0.22) 0%,
            transparent 38%
        ),
        linear-gradient(160deg, var(--bg) 0%, var(--bg-soft) 52%, #040b1c 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(133, 169, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(133, 169, 255, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, #000 44%, transparent 100%);
    z-index: 0;
}

.container {
    width: min(1020px, 92%);
    margin: clamp(1.3rem, 2.4vw, 2.3rem) auto 3rem;
    position: relative;
    z-index: 1;
}

.inline-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.55rem 0 0.8rem;
}

.inline-nav span[aria-hidden="true"] {
    color: #5d78a9;
}

.inline-nav-form {
    display: inline-flex;
    flex-direction: row;
    gap: 0;
    margin: 0;
}

.hero {
    padding: 0.3rem 0 0.25rem;
    animation: hero-in 500ms ease-out;
}

.hero h1 {
    margin: 0;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.85rem, 1.5rem + 1vw, 2.45rem);
    line-height: 1.1;
    letter-spacing: 0.015em;
    color: #f5f8ff;
    text-shadow: 0 6px 24px rgba(80, 136, 255, 0.22);
}

.brand-send { color: #ffffff; }
.brand-check { color: #39ff14; }

.mfa-code-row {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    margin: 1.1rem 0 0.4rem;
    flex-wrap: wrap;
}

.mfa-digit {
    width: 2.6rem;
    height: 3.1rem;
    padding: 0;
    text-align: center;
    font-family: "JetBrains Mono", "Sora", monospace;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #f5f8ff;
    background: #0a1731;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.mfa-digit:focus {
    outline: none;
    border-color: #39ff14;
    box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.22);
}

.mfa-help {
    text-align: center;
    margin-top: 0.2rem;
}

.brand-tagline {
    display: inline-block;
    margin-left: 0.35rem;
    font-family: "Manrope", "Segoe UI", sans-serif;
    font-size: clamp(0.66rem, 0.62rem + 0.08vw, 0.78rem);
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.005em;
    color: var(--muted);
    vertical-align: middle;
    white-space: nowrap;
}

.hero p {
    margin-top: 0.62rem;
    color: var(--muted);
    max-width: 58ch;
    font-size: clamp(1rem, 0.97rem + 0.2vw, 1.08rem);
}

.login-hero {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    position: relative;
    z-index: 6;
}

.login-hero .company-chip {
    flex: 0 0 auto;
    --chip-size: 60px;
    --chip-border-width: 3px;
    --chip-orbit-radius: calc((var(--chip-size) / 2) - (var(--chip-border-width) / 2));
    --chip-dot-size: 8px;
    width: var(--chip-size);
    padding: 0.5rem 0.35rem;
    position: relative;
    overflow: visible;
    isolation: isolate;
    z-index: 7;
    border: var(--chip-border-width) solid #5d7397;
    border-radius: 50%;
    background: linear-gradient(
        180deg,
        rgba(23, 39, 67, 0.95) 0%,
        rgba(12, 24, 45, 0.95) 100%
    );
    color: #dbe8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--chip-size);
    align-self: flex-start;
    margin-top: -6px;
    text-align: center;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow:
        inset 0 1px 0 rgba(210, 226, 255, 0.14),
        0 10px 20px rgba(2, 8, 20, 0.35);
}

.login-hero .company-chip::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--chip-dot-size);
    height: var(--chip-dot-size);
    border-radius: 999px;
    z-index: 20;
    pointer-events: none;
    background: #39ff14;
    filter: drop-shadow(0 0 7px #39ff14)
        drop-shadow(0 0 13px rgba(57, 255, 20, 0.95));
    transform: translate(-50%, -50%) rotate(0deg)
        translateY(calc(var(--chip-orbit-radius) * -1));
    animation: company-chip-border-dot 2.8s linear infinite;
}

.login-hero .hero-copy {
    flex: 0 1 64ch;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    text-align: left;
}

.login-hero .hero-copy p {
    max-width: 64ch;
    margin-top: -0.18rem;
    line-height: 1;
}

.login-hero .hero-copy h1 {
    margin: 0;
    line-height: 0.96;
}

.login-hero + .auth-card {
    margin-top: 0.2rem;
}

.card {
    background:
        linear-gradient(170deg, rgba(111, 162, 255, 0.1) 0%, transparent 36%),
        linear-gradient(180deg, rgba(20, 41, 78, 0.95) 0%, var(--surface) 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(1rem, 2.2vw, 1.35rem);
    margin-top: 1.1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    animation: card-in 420ms ease-out;
    transition:
        border-color 170ms ease,
        transform 170ms ease,
        box-shadow 170ms ease;
}

.card:hover {
    border-color: var(--line-strong);
    transform: translateY(-1px);
    box-shadow: 0 26px 58px rgba(2, 8, 20, 0.62);
}

.card:nth-of-type(2) {
    animation-delay: 80ms;
}

.success {
    border-left: 6px solid var(--accent);
    background:
        linear-gradient(95deg, rgba(94, 150, 255, 0.2) 0 21%, transparent 38%),
        linear-gradient(180deg, #173057 0%, var(--surface) 100%);
}

.result-summary-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.result-summary-head h2 {
    margin: 0;
}

.copy-result-btn {
    margin-left: auto;
    min-height: 40px;
    padding: 0.5rem 0.85rem;
    white-space: nowrap;
}

.upload-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.upload-history-head p {
    margin-bottom: 0;
}

.history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.45rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(12, 28, 58, 0.78);
    color: #d7e6ff;
    font-weight: 800;
    white-space: nowrap;
}

.history-entry + .history-entry {
    margin-top: 1rem;
}

.history-entry {
    border: 1px solid rgba(80, 116, 178, 0.5);
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(18, 37, 70, 0.78) 0%, rgba(10, 22, 45, 0.78) 100%);
}

.history-entry-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.history-entry-head h4 {
    margin: 0 0 0.35rem;
}

.history-entry-head p {
    margin: 0;
}

.history-access-toggle {
    flex: 0 0 auto;
}

.history-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
    gap: 0.65rem;
    margin: 0.85rem 0;
}

.history-meta-item {
    padding: 0.62rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 20, 42, 0.78);
}

.history-meta-label {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.history-meta-value {
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.history-access-panel {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(7, 17, 35, 0.88);
}

.history-access-panel p {
    margin: 0;
    overflow-wrap: anywhere;
}

.history-access-panel p + p {
    margin-top: 0.6rem;
}

.transfer-progress-panel {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(92, 132, 204, 0.52);
    border-radius: 14px;
    background: linear-gradient(
        180deg,
        rgba(11, 25, 50, 0.9) 0%,
        rgba(7, 17, 35, 0.92) 100%
    );
    box-shadow: inset 0 1px 0 rgba(210, 226, 255, 0.08);
}

.transfer-progress-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.transfer-progress-head h3 {
    margin: 0 0 0.22rem;
}

.transfer-progress-status,
.transfer-progress-text,
.transfer-progress-note {
    margin: 0;
}

.transfer-progress-status {
    font-weight: 700;
}

.transfer-progress-text {
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.92rem;
    white-space: nowrap;
}

.transfer-progress-note {
    margin-top: 0.55rem;
    font-size: 0.92rem;
}

.transfer-progress {
    width: 100%;
    height: 14px;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(5, 14, 29, 0.88);
    box-shadow:
        inset 0 1px 0 rgba(186, 208, 251, 0.12),
        inset 0 0 0 1px rgba(38, 65, 110, 0.55);
}

.transfer-progress::-webkit-progress-bar {
    background: rgba(5, 14, 29, 0.88);
    border-radius: 999px;
}

.transfer-progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(128, 179, 255, 0.98) 0%,
        rgba(79, 140, 255, 1) 52%,
        rgba(47, 111, 230, 1) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(240, 246, 255, 0.35),
        0 0 18px rgba(79, 140, 255, 0.28);
}

.transfer-progress::-moz-progress-bar {
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(128, 179, 255, 0.98) 0%,
        rgba(79, 140, 255, 1) 52%,
        rgba(47, 111, 230, 1) 100%
    );
    box-shadow:
        inset 0 1px 0 rgba(240, 246, 255, 0.35),
        0 0 18px rgba(79, 140, 255, 0.28);
}

h2,
h3 {
    margin-top: 0;
    letter-spacing: 0.01em;
}

p {
    line-height: 1.55;
}

hr {
    border: 0;
    border-top: 1px solid rgba(91, 121, 177, 0.45);
    margin: 1rem 0;
}

a {
    color: #8eb8ff;
    text-underline-offset: 2px;
}

a:hover {
    color: #bcd4ff;
}

.inline-nav a,
.inline-nav .nav-link-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    text-decoration: none;
    border: 1px solid var(--auth-btn-border);
    background: linear-gradient(
        180deg,
        var(--auth-btn-top) 0%,
        var(--auth-btn-mid) 40%,
        var(--auth-btn-bottom) 100%
    );
    color: var(--auth-btn-text);
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 0 rgba(16, 44, 99, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(240, 246, 255, 0.34),
        inset 0 -1px 0 rgba(15, 35, 66, 0.56),
        0 3px 0 var(--auth-btn-depth),
        0 7px 14px rgba(10, 22, 44, 0.3);
    transition:
        transform 130ms ease,
        box-shadow 130ms ease,
        border-color 130ms ease,
        color 130ms ease;
}

.inline-nav a:hover,
.inline-nav .nav-link-btn:hover {
    border-color: #95aac9;
    color: var(--auth-btn-text);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(246, 250, 255, 0.36),
        inset 0 -1px 0 rgba(14, 33, 62, 0.58),
        0 4px 0 #3b4f70,
        0 9px 16px rgba(11, 26, 52, 0.36);
}

.inline-nav a:active,
.inline-nav .nav-link-btn:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 0 rgba(223, 234, 250, 0.3),
        inset 0 -1px 0 rgba(10, 27, 50, 0.52),
        0 1px 0 #2f405d,
        0 5px 10px rgba(10, 24, 48, 0.34);
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.9rem;
}

fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

label {
    font-weight: 600;
}

input[type="file"],
input[type="datetime-local"],
input[type="email"],
input[type="text"],
input[type="password"],
select {
    border: 1px solid var(--line);
    border-radius: 12px;
    min-height: 46px;
    padding: 0.75rem 0.85rem;
    font-size: 1rem;
    color: var(--ink);
    background: #0a1731;
    box-shadow: inset 0 1px 0 rgba(187, 211, 255, 0.06);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

input[type="file"]:hover,
input[type="datetime-local"]:hover,
input[type="email"]:hover,
input[type="text"]:hover,
input[type="password"]:hover,
select:hover {
    border-color: var(--line-strong);
}

input:disabled,
select:disabled,
button:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

input[type="file"]:focus-visible,
input[type="datetime-local"]:focus-visible,
input[type="email"]:focus-visible,
input[type="text"]:focus-visible,
input[type="password"]:focus-visible,
select:focus-visible,
button:focus-visible,
.link-btn:focus-visible,
a:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.35);
}

input::file-selector-button {
    border: 0;
    border-radius: 9px;
    background: #1c396d;
    color: var(--ink);
    padding: 0.45rem 0.7rem;
    margin-right: 0.7rem;
    cursor: pointer;
}

input[type="checkbox"] {
    accent-color: var(--accent);
    width: 1.05rem;
    height: 1.05rem;
}

button,
.link-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    background: linear-gradient(
        180deg,
        var(--auth-btn-top) 0%,
        var(--auth-btn-mid) 40%,
        var(--auth-btn-bottom) 100%
    );
    border: 1px solid var(--auth-btn-border);
    color: var(--auth-btn-text);
    text-decoration: none;
    padding: 0.62rem 1rem;
    border-radius: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-shadow: 0 1px 0 rgba(16, 44, 99, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(240, 246, 255, 0.34),
        inset 0 -1px 0 rgba(15, 35, 66, 0.56),
        0 4px 0 var(--auth-btn-depth),
        0 8px 18px var(--auth-btn-glow);
    transition:
        transform 130ms ease,
        filter 130ms ease,
        box-shadow 130ms ease,
        border-color 130ms ease;
}

button::before,
.link-btn::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 44%;
    border-radius: inherit;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 1;
}

button:hover,
.link-btn:hover {
    filter: brightness(1.02);
    border-color: #95aac9;
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(246, 250, 255, 0.36),
        inset 0 -1px 0 rgba(14, 33, 62, 0.58),
        0 5px 0 #3b4f70,
        0 10px 20px rgba(11, 26, 52, 0.42);
}

button:active,
.link-btn:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 0 rgba(223, 234, 250, 0.3),
        inset 0 -1px 0 rgba(10, 27, 50, 0.52),
        0 2px 0 #2f405d,
        0 6px 12px rgba(10, 24, 48, 0.38);
}

.auth-card {
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: -40% -10% auto;
    height: 55%;
    pointer-events: none;
    background: radial-gradient(
        circle at 50% 0%,
        rgba(108, 146, 204, 0.14) 0%,
        rgba(108, 146, 204, 0) 72%
    );
}

.auth-form .auth-submit,
.auth-actions .auth-pill,
.auth-actions .auth-pill.auth-pill-ghost {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--auth-btn-border);
    background: linear-gradient(
        180deg,
        var(--auth-btn-top) 0%,
        var(--auth-btn-mid) 40%,
        var(--auth-btn-bottom) 100%
    );
    color: var(--auth-btn-text);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 0 rgba(16, 44, 99, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(240, 246, 255, 0.34),
        inset 0 -1px 0 rgba(15, 35, 66, 0.56),
        0 4px 0 var(--auth-btn-depth),
        0 8px 18px var(--auth-btn-glow);
    transition:
        transform 130ms ease,
        filter 130ms ease,
        box-shadow 130ms ease,
        border-color 130ms ease;
}

.auth-form .auth-submit::before,
.auth-actions .auth-pill::before,
.auth-actions .auth-pill.auth-pill-ghost::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 44%;
    border-radius: inherit;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.auth-form .auth-submit {
    width: clamp(190px, 58%, 280px);
    align-self: center;
    min-height: 52px;
    margin-top: 0.2rem;
    border-radius: 14px;
    padding: 0.65rem 1rem;
}

.auth-form .auth-submit:hover,
.auth-actions .auth-pill:hover,
.auth-actions .auth-pill.auth-pill-ghost:hover {
    filter: brightness(1.02);
    border-color: #95aac9;
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(246, 250, 255, 0.36),
        inset 0 -1px 0 rgba(14, 33, 62, 0.58),
        0 5px 0 #3b4f70,
        0 10px 20px rgba(11, 26, 52, 0.42);
}

.auth-form .auth-submit:active,
.auth-actions .auth-pill:active,
.auth-actions .auth-pill.auth-pill-ghost:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 1px 0 rgba(223, 234, 250, 0.3),
        inset 0 -1px 0 rgba(10, 27, 50, 0.52),
        0 2px 0 #2f405d,
        0 6px 12px rgba(10, 24, 48, 0.38);
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.2rem 0 0;
}

.auth-actions .auth-pill {
    min-height: 40px;
    padding: 0.45rem 0.8rem;
    border-radius: 11px;
    font-size: 0.9rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.2rem;
}

.audit-shell {
    width: min(1320px, 95%);
}

.audit-hero .hero-copy p {
    margin-top: 0.2rem;
    max-width: 70ch;
    line-height: 1.35;
}

.audit-console-card {
    margin-top: 1.3rem;
}

.audit-console-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.audit-console-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.7rem;
}

.audit-kicker {
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8fb3ff;
}

.audit-scope-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.audit-scope-pill-global {
    background: linear-gradient(135deg, rgba(103, 164, 255, 0.3), rgba(44, 93, 193, 0.18));
    color: #f3f8ff;
}

.audit-scope-pill-domain {
    background: linear-gradient(135deg, rgba(255, 196, 96, 0.2), rgba(132, 92, 20, 0.18));
    border-color: #9f7c3b;
    color: #ffeec7;
}

.audit-banner {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(110, 160, 255, 0.34);
    background: rgba(75, 118, 214, 0.16);
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(120px, 1fr)) auto;
    gap: 0.9rem;
    align-items: end;
}

.audit-filter-span {
    grid-column: span 2;
}

.audit-filter-actions {
    display: flex;
    align-items: flex-end;
    margin-top: 0;
}

.audit-filter-help {
    grid-column: 1 / -1;
    margin: 0;
}

.audit-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.audit-stat-card {
    min-height: 114px;
    padding: 0.95rem 1rem;
}

.audit-stat-label {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8eb8ff;
}

.audit-stat-value {
    display: block;
    margin: 0.32rem 0 0.22rem;
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(1.55rem, 1.15rem + 1vw, 2.3rem);
    line-height: 1;
}

.audit-stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.audit-stat-card-link:hover,
.audit-stat-card-link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(94, 169, 255, 0.4);
    background: rgba(13, 23, 39, 0.9);
    box-shadow: 0 14px 28px rgba(3, 9, 18, 0.28);
}

.audit-stat-card-active {
    border-color: rgba(94, 169, 255, 0.52);
    background: linear-gradient(180deg, rgba(19, 34, 57, 0.97), rgba(10, 19, 32, 0.96));
    box-shadow: 0 16px 30px rgba(2, 8, 18, 0.32);
}

.audit-summary-hint {
    margin: 0.5rem 0 1rem;
    font-size: 0.88rem;
}

.audit-summary-hint a {
    color: #c4ddff;
}

.audit-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.85rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 32px;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.status-pill-ok {
    background: rgba(54, 133, 88, 0.2);
    border-color: rgba(95, 190, 132, 0.5);
    color: #bdf2cc;
}

.status-pill-fail {
    background: rgba(177, 63, 78, 0.22);
    border-color: rgba(255, 141, 152, 0.5);
    color: #ffd5db;
}

.table-subtext {
    margin-top: 0.28rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
}

.audit-wrap {
    max-width: 36ch;
    white-space: normal;
    word-break: break-word;
}

.audit-header-value + .audit-header-value {
    margin-top: 0.35rem;
}

.audit-header-value code {
    display: block;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
}

@media (max-width: 520px) {
    .auth-form .auth-submit {
        width: 100%;
    }
}

.inline-delete-form {
    margin: 0;
}

.user-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mini-action-btn {
    min-height: 36px;
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    font-size: 0.8rem;
    box-shadow:
        inset 0 1px 0 rgba(240, 246, 255, 0.3),
        inset 0 -1px 0 rgba(15, 35, 66, 0.5),
        0 3px 0 rgba(28, 40, 63, 0.85),
        0 8px 16px rgba(10, 22, 44, 0.35);
}

.mini-action-btn::before {
    height: 48%;
}

.mini-action-btn-warning {
    background: linear-gradient(180deg, #d9b56f 0%, #bf8b34 52%, #97661e 100%);
    border-color: #a47428;
    color: #fff7e7;
}

.mini-action-btn-accent {
    background: linear-gradient(180deg, #81abff 0%, #4f8cff 48%, #2f6fe6 100%);
    border-color: #4e7fd8;
    color: #eef5ff;
}

.mini-action-btn-danger {
    background: linear-gradient(180deg, #ff9aa6 0%, #f06f7d 48%, #d95362 100%);
    border-color: #c54a57;
    color: #fff4f6;
}

button.icon-danger-btn {
    min-height: 36px;
    width: 36px;
    padding: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #ff9aa6 0%, #f06f7d 48%, #d95362 100%);
    border: 1px solid #c54a57;
    color: #fff4f6;
    box-shadow:
        inset 0 1px 0 rgba(255, 238, 241, 0.35),
        inset 0 -2px 0 rgba(127, 33, 44, 0.55),
        0 4px 0 #9f3541,
        0 10px 16px rgba(103, 24, 35, 0.45);
}

button.icon-danger-btn::before {
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 48%
    );
}

button.icon-danger-btn svg {
    fill: currentColor;
}

button.icon-danger-btn:hover {
    border-color: #d0606d;
    box-shadow:
        inset 0 1px 0 rgba(255, 238, 241, 0.38),
        inset 0 -2px 0 rgba(120, 29, 40, 0.58),
        0 6px 0 #ad3b48,
        0 12px 20px rgba(111, 28, 39, 0.5);
}

button.icon-danger-btn:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 238, 241, 0.26),
        inset 0 -1px 0 rgba(104, 25, 34, 0.5),
        0 2px 0 #8f2f3a,
        0 6px 10px rgba(91, 21, 31, 0.4);
}

table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--line);
}

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

caption {
    text-align: left;
    padding: 0.65rem 0.75rem;
    color: var(--muted);
}

thead tr {
    background: #132749;
}

th,
td {
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--line);
}

th {
    font-weight: 700;
}

tbody tr:nth-child(even) {
    background: rgba(141, 173, 245, 0.04);
}

tbody tr:hover {
    background: rgba(92, 156, 255, 0.18);
}

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

.error {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid #8b4551;
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    font-weight: 700;
}

.success-text {
    color: #acd1ff;
    font-weight: 700;
}

.warn {
    background: var(--warning-bg);
    border: 1px solid var(--warning-line);
    color: var(--warning-text);
    border-radius: 12px;
    padding: 0.75rem;
}

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.45;
}

.upload-guidance-stack {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin-top: -0.28rem;
}

.upload-guidance-stack > p,
.upload-guidance-stack > .checkline {
    margin: 0;
}

code {
    display: inline-block;
    font-family: "JetBrains Mono", Consolas, monospace;
    background: #0b1936;
    border: 1px solid var(--line);
    padding: 0.15rem 0.4rem;
    border-radius: 7px;
    font-size: 0.9rem;
    color: #c4dbff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes hero-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes company-chip-border-dot {
    from {
        transform: translate(-50%, -50%) rotate(0deg)
            translateY(calc(var(--chip-orbit-radius) * -1));
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg)
            translateY(calc(var(--chip-orbit-radius) * -1));
    }
}

@media (max-width: 700px) {
    .container {
        width: 95%;
        margin-top: 1rem;
    }

    .inline-nav span[aria-hidden="true"] {
        display: none;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    .audit-console-head {
        flex-direction: column;
    }

    .audit-console-actions {
        justify-content: flex-start;
    }

    .audit-filter-grid {
        grid-template-columns: 1fr;
    }

    .audit-filter-span {
        grid-column: auto;
    }

    .audit-filter-actions {
        width: 100%;
    }

    .audit-filter-actions button {
        width: 100%;
    }

    .audit-summary-grid {
        grid-template-columns: 1fr;
    }

    .transfer-progress-text {
        white-space: normal;
    }

    .login-hero {
        gap: 0.7rem;
    }

    .login-hero .company-chip {
        --chip-size: 54px;
        --chip-dot-size: 7px;
        width: var(--chip-size);
        height: var(--chip-size);
        margin-top: -4px;
        font-size: 0.56rem;
    }

    .login-hero .hero-copy {
        padding-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (forced-colors: active) {
    .link-btn,
    button {
        border: 1px solid CanvasText;
    }
}

/* ── Mode selection grid ── */
.mode-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    margin-top: 1.2rem;
}

.mode-select-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 37, 70, 0.85) 0%, rgba(10, 22, 45, 0.85) 100%);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color 170ms ease,
        transform 170ms ease,
        box-shadow 170ms ease,
        background 170ms ease;
}

.mode-select-card:hover {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(30, 58, 108, 0.9) 0%, rgba(18, 37, 70, 0.9) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 140, 255, 0.18);
    color: var(--ink);
}

.mode-select-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(79, 140, 255, 0.14);
    color: var(--accent);
    flex-shrink: 0;
}

.mode-select-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink);
}

.mode-select-desc {
    font-size: 0.88rem;
    line-height: 1.4;
}

/* ── Text content view ── */
.text-content-box {
    margin-top: 0.9rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(4, 11, 24, 0.88);
    font-family: "JetBrains Mono", Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #d7ecff;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: text;
    min-height: 80px;
}

/* ── Radio group ── */
.radio-group-fieldset {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.75rem 1rem 0.9rem;
    margin: 0.4rem 0;
}

.radio-group-fieldset legend {
    padding: 0 0.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(10, 22, 45, 0.78);
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 130ms ease, background 130ms ease;
}

.radio-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(79, 140, 255, 0.14);
    color: var(--accent-contrast);
}

.radio-option input[type="radio"] {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    accent-color: var(--accent);
}
