*,
*::before,
*::after {
    box-sizing: border-box;
}

@font-face {
    font-family: "Cairo";
    src: url("/static/fonts/Cairo-ExtraLight.ttf") format("truetype");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("/static/fonts/Cairo-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("/static/fonts/Cairo-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("/static/fonts/Cairo-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("/static/fonts/Cairo-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cairo";
    src: url("/static/fonts/Cairo-Black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Qadsiah";
    src: url("/static/fonts/Qadsiah-v3-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0b0f14;
    --bg-accent: rgba(255, 255, 255, 0.04);
    --card: rgba(16, 22, 32, 0.94);
    --card-light: rgba(255, 255, 255, 0.05);
    --text: #e6edf5;
    --muted: rgba(190, 201, 218, 0.75);
    --border: rgba(74, 90, 115, 0.35);
    --accent: #38bdf8;
    --accent-strong: #22c55e;
    --success: #22c55e;
    --error: #f87171;
    --warn: #fbbf24;
    --font: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: "Qadsiah", "Cairo", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body[data-theme="light"] {
    --bg: #f6fbfb;
    --bg-accent: rgba(13, 148, 136, 0.07);
    --card: rgba(255, 255, 255, 0.96);
    --card-light: #eef9f8;
    --text: #102a2c;
    --muted: #5c7476;
    --border: rgba(13, 117, 110, 0.2);
    --accent: #0f9b8e;
    --accent-strong: #087b70;
    --success: #138a66;
    --error: #d84b4b;
    --warn: #b77912;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

html.embedded,
body.embedded {
    overflow-x: hidden;
    overflow-y: auto;
}


body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.18), transparent 45%),
        radial-gradient(circle at 85% 15%, rgba(34, 197, 94, 0.12), transparent 40%),
        radial-gradient(circle at 50% 80%, rgba(56, 189, 248, 0.12), transparent 55%),
        linear-gradient(180deg, rgba(11, 15, 20, 0.96), rgba(11, 15, 20, 1));
    pointer-events: none;
    z-index: -1;
}

body[data-theme="light"]::before {
    background:
        radial-gradient(circle at 15% 10%, rgba(20, 184, 166, 0.14), transparent 42%),
        radial-gradient(circle at 85% 15%, rgba(45, 212, 191, 0.11), transparent 38%),
        linear-gradient(180deg, #f9fdfd, #edf8f7);
}

body[data-theme="light"] .login-card,
body[data-theme="light"] .charter-card,
body[data-theme="light"] .card {
    box-shadow: 0 18px 42px rgba(15, 91, 87, 0.12);
}

body[data-theme="light"] .input-field::before,
body[data-theme="light"] input[type="number"],
body[data-theme="light"] input[type="text"],
body[data-theme="light"] textarea,
body[data-theme="light"] .scoring-card,
body[data-theme="light"] .score-pill,
body[data-theme="light"] .indicator-select,
body[data-theme="light"] .custom-adjustment,
body[data-theme="light"] .custom-adjustment-input input[type="number"],
body[data-theme="light"] .transferroom-details,
body[data-theme="light"] .benchmark-chip,
body[data-theme="light"] .benchmark-average,
body[data-theme="light"] .adjustment-item,
body[data-theme="light"] .profile-media {
    background: #f5fbfa;
}

body[data-theme="light"] .btn--secondary,
body[data-theme="light"] .tab-bar,
body[data-theme="light"] .governance {
    background: #edf8f7;
}

body[data-theme="light"] .benchmark-chip.highlight,
body[data-theme="light"] .tab-btn.active {
    background: rgba(15, 155, 142, 0.14);
}

body[data-theme="light"] .benchmark-chip.highlight {
    box-shadow: 0 10px 24px rgba(15, 155, 142, 0.16);
}

body[data-theme="light"] .table-scroll {
    background: #ffffff;
}

body[data-theme="light"] .table-scroll table thead,
body[data-theme="light"] .parsed-table th {
    background: #e4f4f2;
}

body[data-theme="light"] .governance {
    border-color: rgba(13, 117, 110, 0.25);
}

body[data-theme="light"] .governance-label,
body[data-theme="light"] .governance-value {
    color: var(--muted);
}

body[data-theme="light"] .governance-value {
    color: var(--text);
}

body[data-theme="light"] .btn--primary {
    background: linear-gradient(135deg, #0f9b8e, #16b8a8);
    color: #ffffff;
}

body[data-theme="light"] .btn--primary:not(:disabled):hover {
    box-shadow: 0 14px 28px rgba(15, 155, 142, 0.28);
}

.theme-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card-light);
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    background: var(--bg-accent);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.theme-toggle--fixed {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.login-card {
    width: min(520px, 100%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 0 32px 80px rgba(4, 8, 16, 0.55);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.login-brand h1 {
    margin: 0.2rem 0 0;
    font-size: 1.5rem;
}

.login-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
    align-items: stretch;
}

.login-btn {
    width: 100%;
}

.btn--sso {
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(20, 184, 166, 0.18);
}

.btn--sso.is-disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.55;
    filter: grayscale(0.4);
}

.login-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    background: var(--border);
}

.login-error {
    margin: 0;
    color: var(--error);
    font-weight: 600;
}

.input-field {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr 36px;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.2rem 0.2rem 0.2rem 0.4rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: transparent;
    overflow: hidden;
}

.input-field::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.03);
    z-index: 0;
}

.input-field > * {
    position: relative;
    z-index: 1;
}

.login-card .input-field input {
    border: none;
    background: transparent;
    color: var(--text);
    padding: 1.1rem 0.75rem 0.6rem 0;
    font-size: 1.05rem;
    width: 100%;
    box-shadow: none;
}

.input-field input:focus {
    outline: none;
}

.input-field input:-webkit-autofill,
.input-field input:-webkit-autofill:hover,
.input-field input:-webkit-autofill:focus,
.input-field input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text);
    box-shadow: 0 0 0 1000px rgba(10, 14, 20, 0.95) inset;
    transition: background-color 9999s ease-in-out 0s;
    caret-color: var(--text);
}

.login-card .input-field input:-webkit-autofill,
.login-card .input-field input:-webkit-autofill:hover,
.login-card .input-field input:-webkit-autofill:focus,
.login-card .input-field input:-webkit-autofill:active {
    box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    border-radius: 14px;
    background-clip: content-box !important;
    background-color: transparent !important;
    -webkit-text-fill-color: var(--text) !important;
}

.input-field label {
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    pointer-events: none;
}

.input-field input:focus + label,
.input-field input:not(:placeholder-shown) + label {
    top: 28%;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.12);
}

.field-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--accent);
}

.toggle-visibility {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-visibility svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.toggle-visibility:hover {
    color: var(--text);
    background: rgba(56, 189, 248, 0.12);
}

.app-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 2.5rem clamp(1.25rem, 4vw, 2.75rem) 3.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.workflow {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 0.95fr);
    gap: 1.5rem;
    align-items: start;
}

.workflow-left,
.workflow-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.workflow-right {
    position: sticky;
    top: 24px;
    align-self: start;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    margin-left: auto;
    min-width: 240px;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.logout-link {
    position: fixed;
    top: 18px;
    right: 24px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(15, 20, 30, 0.6);
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.logout-link:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.logout-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
}

.logout-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.4rem;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.hero-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    letter-spacing: -0.02em;
    font-family: var(--font-display);
}

.subtitle {
    margin: 0.35rem 0 0;
    color: var(--muted);
    max-width: 600px;
    line-height: 1.6;
}

.status {
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--bg-accent);
    backdrop-filter: blur(12px);
}

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

.status--loading {
    border-color: var(--accent);
    color: var(--accent);
}

.status--success {
    border-color: var(--success);
    color: var(--success);
}

.status--error {
    border-color: var(--error);
    color: var(--error);
}

.status--warn {
    border-color: var(--warn);
    color: var(--warn);
}

.charter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.charter-card {
    background: var(--card);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 20px 40px rgba(4, 8, 16, 0.45);
}

.charter-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.charter-card ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.4;
}

.charter-card .note {
    font-size: 0.85rem;
    color: var(--muted);
}

.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    border-radius: 24px;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 24px 50px rgba(4, 8, 16, 0.45);
    backdrop-filter: blur(18px);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card header h2 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    font-family: var(--font-display);
}

.card header p {
    margin: 0.35rem 0 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.summary-head img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.step-card header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field span {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

input[type="number"],
input[type="text"],
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-size: 1.05rem;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]::placeholder {
    color: rgba(190, 201, 218, 0.35);
}

input[type="number"]:focus,
textarea:focus {
    outline: 2px solid rgba(56, 189, 248, 0.4);
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.55);
    outline-offset: 2px;
}

.slider-title {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-meta-text {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.slider-range {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
}

.scoring-matrix {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.scoring-card {
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 0.4rem 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.scoring-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: rgba(148, 163, 184, 0.6);
}

.scoring-card.adjustment-positive {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.06);
}

.scoring-card.adjustment-positive::before {
    background: rgba(34, 197, 94, 0.9);
}

.scoring-card.adjustment-negative {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
}

.scoring-card.adjustment-negative::before {
    background: rgba(239, 68, 68, 0.9);
}

.scoring-card.adjustment-neutral {
    border-color: rgba(148, 163, 184, 0.35);
}

.scoring-head {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.7rem 0;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.score-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    padding: 0.4rem 0.7rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.8rem;
    color: var(--muted);
}

.scoring-card.adjustment-positive .score-pill {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

.scoring-card.adjustment-negative .score-pill {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

.score-pill strong {
    font-size: 1rem;
    color: var(--text);
}

.chevron {
    font-size: 1.1rem;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.scoring-card.is-open .chevron {
    transform: rotate(180deg);
}

.scoring-body {
    display: grid;
    gap: 0.9rem;
    padding: 0.4rem 0 1rem;
    border-top: 1px solid var(--border);
}

.scoring-card:not(.is-open) .scoring-body {
    display: none;
}

.indicator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem 1rem;
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--muted);
    padding: 0.4rem 0;
}

.indicator-row span {
    color: var(--text);
    font-weight: 500;
}

.indicator-select {
    min-width: 64px;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 600;
    text-align: center;
}

.score-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.score-summary div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.score-summary strong {
    font-size: 1rem;
    color: var(--text);
}

.score-summary .final-value {
    font-size: 1.15rem;
    font-weight: 700;
}

.scoring-card.adjustment-positive .final-value {
    color: rgba(34, 197, 94, 0.95);
}

.scoring-card.adjustment-negative .final-value {
    color: rgba(239, 68, 68, 0.95);
}

.scoring-card.adjustment-neutral .final-value {
    color: rgba(226, 232, 240, 0.9);
}

.override-toggle {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding-top: 0.35rem;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.override-slider {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.override-range {
    width: 100%;
    accent-color: var(--accent);
}

.override-range:disabled {
    opacity: 0.5;
}

.custom-adjustment {
    border-radius: 18px;
    border: 1px solid var(--border);
    padding: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
    display: grid;
    gap: 0.9rem;
}

.custom-adjustment-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.custom-adjustment-head h3 {
    margin: 0;
    font-size: 1rem;
}

.custom-adjustment-head p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.custom-adjustment-body {
    display: grid;
    gap: 0.8rem;
}

.custom-adjustment-body.is-hidden {
    display: none;
}

.custom-adjustment-controls {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    align-items: center;
}

.custom-adjustment-input {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 180px;
}

.custom-adjustment-input input[type="number"] {
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    font-weight: 600;
}

.custom-adjustment-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    min-width: 72px;
    text-align: left;
}

.btn {
    margin-top: 0.5rem;
    border-radius: 16px;
    padding: 0.85rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.btn--primary {
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    color: #1c1d22;
}

.btn--secondary {
    background: rgba(15, 20, 30, 0.6);
    color: var(--text);
    border-color: var(--border);
}

.btn--secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn--primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.35);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.form-inline-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: rgba(0, 0, 0, 0.6);
    animation: spin 0.8s linear infinite;
    opacity: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.transferroom-details {
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 0.9rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.transferroom-details h3 {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.transferroom-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.transferroom-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.8rem;
}

.transferroom-list li strong {
    color: var(--text);
    font-size: 0.9rem;
    text-align: right;
    font-weight: 600;
}

.price-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.metric-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
}

.metric-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.metric-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.metric-value.xl {
    font-size: 2rem;
}

.final-price {
    grid-column: span 2;
}


.benchmark-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.benchmark-chip {
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    opacity: 0.8;
    color: var(--muted);
    font-size: 0.85rem;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.benchmark-chip.highlight {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.18);
    opacity: 1;
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(56, 189, 248, 0.22);
}

.benchmark-chip p {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.benchmark-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.benchmark-label img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.benchmark-chip strong {
    font-size: 1rem;
}

.benchmark-chip.highlight p {
    font-size: 0.9rem;
}

.benchmark-chip.highlight strong {
    font-size: 1.3rem;
}

.benchmark-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.benchmark-note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--warn);
}

.benchmark-average {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    border: 1px dashed var(--border);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
    color: var(--muted);
}

.benchmark-average span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.benchmark-average img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.benchmark-average strong {
    color: var(--text);
    font-size: 1.05rem;
}

.tab-bar {
    display: inline-flex;
    background: rgba(15, 20, 30, 0.6);
    padding: 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    gap: 0.35rem;
    width: fit-content;
}

.tab-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn.active {
    background: rgba(56, 189, 248, 0.18);
    color: var(--text);
}

.tab-panels {
    margin-top: 1rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.adjustment-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


body.report-mode .print-hide {
    display: none !important;
}

body.report-mode .table-scroll {
    max-height: none;
    overflow: visible;
}

body.report-mode table thead {
    position: static;
}

.adjustment-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 14px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.adjustment-item.adjustment-positive {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.adjustment-item.adjustment-negative {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.adjustment-item.adjustment-neutral {
    border-color: rgba(148, 163, 184, 0.35);
}

.adjustment-title {
    margin: 0;
    font-weight: 600;
}

.adjustment-desc {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.adjustment-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.info-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: start;
}

.profile-media {
    position: relative;
    width: 120px;
    height: 150px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.profile-media img {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: none;
    background: rgba(0, 0, 0, 0.25);
}

.profile-media img.loaded {
    display: block;
}

.image-fallback {
    grid-area: 1 / 1;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    padding: 0.5rem;
}

.profile-media img.loaded + .image-fallback {
    display: none;
}

.info-list dt {
    color: var(--muted);
    font-weight: 500;
}

.info-list dd {
    margin: 0;
    font-weight: 600;
}

.governance {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    background: rgba(15, 20, 30, 0.35);
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.governance-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.governance-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    color: rgba(190, 201, 218, 0.7);
}

.governance-value {
    color: rgba(226, 232, 240, 0.85);
    font-weight: 500;
}

.placeholder,
.placeholder-row {
    color: var(--muted);
    font-style: italic;
}

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

.table-scroll {
    overflow: auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
    max-height: 420px;
}

.table-scroll table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table thead {
    background: rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    backdrop-filter: blur(6px);
}

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

table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.parsed-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.parsed-table th,
.parsed-table td {
    border: 1px solid var(--border);
    padding: 0.5rem;
    text-align: left;
}

.parsed-table th {
    background: rgba(255, 255, 255, 0.04);
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-4px);
        border-color: rgba(56, 189, 248, 0.4);
        box-shadow: 0 30px 70px rgba(4, 8, 16, 0.55);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .card {
        animation: rise 0.6s ease both;
    }

    .card:nth-of-type(2) { animation-delay: 0.05s; }
    .card:nth-of-type(3) { animation-delay: 0.1s; }
    .card:nth-of-type(4) { animation-delay: 0.15s; }
    .card:nth-of-type(5) { animation-delay: 0.2s; }
    .card:nth-of-type(6) { animation-delay: 0.25s; }
    .card:nth-of-type(7) { animation-delay: 0.3s; }
    .card:nth-of-type(8) { animation-delay: 0.35s; }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .final-price {
        grid-column: span 1;
    }
}

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

@media (max-width: 640px) {
    .hero-actions {
        width: 100%;
        align-items: flex-start;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .charter-card,
    .card {
        padding: 1.1rem;
    }

    .scoring-head {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 0.5rem;
    }

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

    .profile-media {
        width: 100%;
        height: 200px;
    }
}
.category-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.category-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.custom-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
}
