:root {
    --font-display: "Sora", "Segoe UI", sans-serif;
    --font-body: "Space Grotesk", "Segoe UI", sans-serif;
    --font-mono: "Azeret Mono", "Fira Code", monospace;

    --ink-strong: #1d1f2a;
    --ink-main: #2d3040;
    --ink-soft: #5e6276;
    --ink-faint: #8e92a3;

    --surface-page: #f6f0e6;
    --surface-page-alt: #efe6d7;
    --surface-card: #fff9f1;
    --surface-card-strong: #fff4e8;
    --surface-panel: rgba(255, 249, 241, 0.78);
    --surface-sidebar: #171923;

    --line-default: #e8d7c3;
    --line-soft: #f2e6d8;

    --primary: #d16416;
    --primary-strong: #ac4f0f;
    --primary-soft: #f9c998;
    --accent: #0f8085;
    --accent-soft: #9ad7d9;
    --danger: #b63c58;

    --radius-sm: 7px;
    --radius-md: 11px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    --shadow-sm: 0 2px 6px rgba(28, 26, 23, 0.06);
    --shadow-md: 0 8px 20px rgba(26, 23, 19, 0.09);
    --shadow-lg: 0 16px 30px rgba(19, 17, 14, 0.12);

    --ease-cinematic: cubic-bezier(0.2, 0.74, 0.22, 0.99);
    --duration-fast: 150ms;
    --duration-normal: 280ms;

    --sidebar-width: 246px;
}

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.62;
    color: var(--ink-main);
    background:
        radial-gradient(1000px 420px at 8% -10%, rgba(236, 143, 65, 0.22), transparent 65%),
        radial-gradient(700px 360px at 92% 0%, rgba(15, 128, 133, 0.16), transparent 64%),
        linear-gradient(180deg, var(--surface-page) 0%, var(--surface-page-alt) 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.14) 0%, transparent 30%, transparent 70%, rgba(255, 255, 255, 0.14) 100%),
        repeating-linear-gradient(
            135deg,
            rgba(197, 168, 136, 0.05) 0px,
            rgba(197, 168, 136, 0.05) 1px,
            transparent 1px,
            transparent 17px
        );
    opacity: 0.38;
    z-index: -1;
}

::selection {
    background: rgba(209, 100, 22, 0.22);
    color: var(--ink-strong);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(153, 127, 95, 0.45);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 99, 71, 0.6);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: var(--font-display);
    letter-spacing: -0.015em;
    color: var(--ink-strong);
    line-height: 1.22;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-cinematic);
}

a:hover {
    color: var(--primary-strong);
}

.mono,
.gene-id {
    font-family: var(--font-mono);
}

.app-shell {
    display: flex;
    width: 100%;
    min-height: 100vh;
    align-items: stretch;
}

.app-shell > * {
    min-width: 0;
}

.sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 50;
    background:
        linear-gradient(180deg, #1d1f2b 0%, #161824 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 8px 0 24px rgba(15, 14, 18, 0.22);
}

.sidebar-logo {
    display: inline-flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #f1a057 !important;
    text-shadow: 0 4px 14px rgba(209, 100, 22, 0.24);
}

.sidebar-logo small {
    font-family: var(--font-body);
    margin-top: 0.2rem;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(227, 231, 244, 0.55);
}

.sidebar hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    margin: 0.85rem 0;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    position: relative;
    margin: 0.2rem 0;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    color: rgba(232, 236, 249, 0.73);
    font-size: 0.89rem;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-cinematic);
}

.sidebar .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-right: 0.58rem;
    opacity: 0.92;
    vertical-align: middle;
    overflow: hidden;
}

.sidebar .nav-icon svg {
    display: block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(209, 100, 22, 0.24);
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    color: #fff !important;
    background: linear-gradient(90deg, rgba(209, 100, 22, 0.35), rgba(209, 100, 22, 0.14));
    border: 1px solid rgba(233, 178, 129, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 50%;
    width: 3px;
    height: 56%;
    transform: translateY(-50%);
    border-radius: 3px;
    background: #f7c08f;
}

.sidebar-footer {
    font-size: 0.72rem;
    color: rgba(223, 230, 248, 0.52);
    letter-spacing: 0.03em;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.7rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(209, 100, 22, 0.28);
    color: #f1a057;
}

.sidebar-user-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sidebar-user-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(238, 241, 250, 0.92);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-action {
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    color: rgba(233, 178, 129, 0.85);
}

.sidebar-user-action:hover:not(:disabled) {
    color: #f7c08f;
    text-decoration: underline;
}

.sidebar-user-action:disabled {
    opacity: 0.6;
}

/* ---------- sign-in screen ---------- */

.auth-body {
    min-height: 100vh;
    margin: 0;
    background: var(--surface-page);
    color: var(--ink-main);
    font-family: var(--font-body);
}

.auth-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    min-height: 100vh;
    padding: 2.5rem 1.25rem;
}

.auth-card {
    width: min(420px, 100%);
    padding: 2.4rem 2.2rem 2.2rem;
    background: var(--surface-card);
    border: 1px solid var(--line-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.auth-logo {
    display: flex;
    flex-direction: column;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.auth-logo small {
    margin-top: 0.18rem;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
}

.auth-title {
    margin: 1.7rem 0 0.4rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ink-strong);
}

.auth-subtitle {
    margin: 0 0 1.7rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-label {
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-soft);
}

.auth-input {
    margin-bottom: 1.05rem;
    padding: 0.62rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--ink-strong);
    background: #fffdf9;
    border: 1px solid var(--line-default);
    border-radius: var(--radius-sm);
    transition: border-color var(--duration-fast) var(--ease-cinematic),
        box-shadow var(--duration-fast) var(--ease-cinematic);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(209, 100, 22, 0.16);
}

.auth-error {
    margin: 0 0 1rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--danger);
    background: rgba(182, 60, 88, 0.08);
    border: 1px solid rgba(182, 60, 88, 0.28);
    border-radius: var(--radius-sm);
}

.auth-submit {
    padding: 0.68rem 1rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff9f1;
    background: var(--primary);
    border: 1px solid var(--primary-strong);
    border-radius: var(--radius-sm);
    transition: background var(--duration-fast) var(--ease-cinematic);
}

.auth-submit:hover:not(:disabled) {
    background: var(--primary-strong);
}

.auth-submit:disabled {
    opacity: 0.68;
}

.auth-footnote {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
}

.main-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.main-content > .container-fluid {
    max-width: 1520px;
    padding: 2rem 2.6rem;
}

.main-content > .container-fluid > * {
    animation: fade-slide-in 0.56s var(--ease-cinematic) both;
}

.main-content > .container-fluid > *:nth-child(2) { animation-delay: 0.04s; }
.main-content > .container-fluid > *:nth-child(3) { animation-delay: 0.08s; }
.main-content > .container-fluid > *:nth-child(4) { animation-delay: 0.12s; }
.main-content > .container-fluid > *:nth-child(5) { animation-delay: 0.16s; }
.main-content > .container-fluid > *:nth-child(6) { animation-delay: 0.2s; }

@keyframes fade-slide-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container,
.analyze-form,
.contact-section,
.pipeline-section {
    position: relative;
    background: var(--surface-panel);
    border: 1px solid var(--line-default);
    border-radius: var(--radius-lg);
    padding: 1.28rem 1.4rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(4px);
    margin-bottom: 1.15rem;
    overflow: hidden;
}

.chart-container::after,
.analyze-form::after,
.contact-section::after,
.pipeline-section::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

h4.mb-4 {
    margin-bottom: 1.35rem !important;
    font-size: 1.42rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.chart-container h5,
.chart-container h6,
.analyze-form h5,
.analyze-form h6,
.pipeline-section h5,
.pipeline-section h6,
.contact-section h5 {
    margin-bottom: 0.9rem;
}

.chart-container h5,
.analyze-form h5,
.pipeline-section h5,
.contact-section h5 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ink-main);
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--line-soft);
}

.chart-container h6,
.analyze-form h6,
.pipeline-section h6 {
    font-size: 0.83rem;
    font-weight: 700;
    color: #6d6255;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn {
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.42rem 0.84rem;
    transition: transform var(--duration-fast) var(--ease-cinematic), box-shadow var(--duration-fast) var(--ease-cinematic), background var(--duration-fast) var(--ease-cinematic), color var(--duration-fast) var(--ease-cinematic), border-color var(--duration-fast) var(--ease-cinematic);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #e2873f 100%);
    box-shadow: 0 5px 14px rgba(209, 100, 22, 0.3);
}

.btn-primary:hover {
    color: #fff;
    background: linear-gradient(135deg, #cf5d10 0%, #dd7635 100%);
    box-shadow: 0 8px 16px rgba(209, 100, 22, 0.36);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-secondary {
    border-color: #d8c2aa;
    color: #6f5845;
    background: rgba(255, 255, 255, 0.62);
}

.btn-outline-secondary:hover {
    border-color: #be9774;
    color: #553b26;
    background: #fff2e6;
}

.btn-group .btn {
    border-radius: 9px !important;
}

.form-label {
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    color: #7c6956;
    margin-bottom: 0.35rem;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid #dcc8b2;
    border-radius: 10px;
    min-height: 40px;
    font-size: 0.88rem;
    color: var(--ink-main);
    transition: border-color var(--duration-fast) var(--ease-cinematic), box-shadow var(--duration-fast) var(--ease-cinematic), background var(--duration-fast) var(--ease-cinematic);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(209, 100, 22, 0.14);
    background: #fff;
}

.list-group {
    border: 1px solid var(--line-default);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

#bulk-gene-suggestions .list-group-item,
#search-gene-suggestions .list-group-item {
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #5b4d42;
    padding: 0.45rem 0.72rem;
    background: #fff;
    cursor: pointer;
}

#bulk-gene-suggestions .list-group-item:last-child,
#search-gene-suggestions .list-group-item:last-child {
    border-bottom: 0;
}

#bulk-gene-suggestions .list-group-item:hover,
#search-gene-suggestions .list-group-item:hover {
    background: #fff2e5;
    color: #6a3816;
}

.nav-tabs {
    border-bottom-color: #e6d6c4;
    gap: 0.35rem;
}

.nav-tabs .nav-link {
    border: 0;
    border-radius: 10px 10px 0 0;
    padding: 0.52rem 1rem;
    color: #6f5f4f;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav-tabs .nav-link:hover {
    color: #5f3515;
    background: rgba(209, 100, 22, 0.08);
}

.nav-tabs .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #d16416, #e48b44);
}

.table-responsive {
    border-radius: 11px;
}

.browse-table,
.table {
    margin-bottom: 0;
    color: var(--ink-main);
}

.browse-table thead th,
.table thead th {
    background: #fcf0e3;
    border-bottom: 2px solid rgba(209, 100, 22, 0.56);
    color: #735e4b;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.browse-table td,
.table td {
    border-top-color: #efe1d2;
    font-size: 0.84rem;
    vertical-align: middle;
}

.browse-table tbody tr:hover,
.table-hover tbody tr:hover {
    background: rgba(209, 100, 22, 0.055);
}

.cancer-link {
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
}

.cancer-link:hover {
    color: var(--primary-strong);
    text-decoration: underline;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ddc8b3;
    border-radius: 8px;
    background: #fff;
    color: #4b4035;
    font-size: 0.82rem;
    padding: 0.24rem 0.48rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #fff !important;
    border: 1px solid #e2cfba !important;
    color: #6d5a47 !important;
    border-radius: 8px !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #d16416 !important;
    border-color: #d16416 !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #fff2e6 !important;
    border-color: #cda786 !important;
}

.chart-canvas {
    border-radius: 12px;
    min-height: 320px;
}

.loading-overlay {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-border {
    width: 2.2rem;
    height: 2.2rem;
    border-width: 0.23rem;
    color: var(--primary) !important;
}

.skeleton-block {
    position: relative;
    background: linear-gradient(90deg, #f7ede2 5%, #fff8f1 18%, #f7ede2 32%);
    background-size: 1200px 100%;
    animation: skeleton-wave 1.2s linear infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-wave {
    from { background-position: 0 0; }
    to { background-position: 1200px 0; }
}

.hero-section {
    background: linear-gradient(135deg, #d16416 0%, #e69049 50%, #f2bb86 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 1.85rem 2.2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    right: -220px;
    top: -260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 248, 233, 0.3) 0%, rgba(255, 248, 233, 0) 72%);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(240px, 0.92fr) minmax(460px, 1.8fr);
    gap: 1.8rem;
    align-items: start;
}

.hero-section h1 {
    margin-bottom: 0.55rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-tagline {
    margin: 0;
    font-weight: 600;
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.95);
}

.hero-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.98rem;
    line-height: 1.72;
}

.stat-card {
    background: linear-gradient(160deg, #fff7ec 0%, #fffefc 100%);
    border: 1px solid #ead9c6;
    border-radius: 14px;
    text-align: center;
    padding: 1.3rem 1.1rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.stat-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.stat-card-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(209, 100, 22, 0.1), rgba(15, 128, 133, 0.08));
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-cinematic);
}

.stat-card-link:hover {
    transform: translateY(-2px);
    border-color: #d6b694;
    box-shadow: var(--shadow-md);
    color: inherit;
}

.stat-card-link:hover::before {
    opacity: 1;
}

.stat-value {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 2.12rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.15;
}

.stat-label {
    position: relative;
    z-index: 1;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7d6b59;
    margin-top: 0.26rem;
}

.stat-arrow {
    position: absolute;
    top: 11px;
    right: 12px;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-4px);
    transition: all var(--duration-fast) var(--ease-cinematic);
}

.stat-card-link:hover .stat-arrow {
    opacity: 1;
    transform: translateX(0);
}

.pipeline-section h6 {
    color: #685747;
}

.pipeline-step {
    border: 1px solid #edceb0;
    background: #fff5ea;
    color: #8a4d1d;
    border-radius: 999px;
    padding: 0.28rem 0.78rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.analyze-form p.text-muted,
.chart-container p.text-muted,
.pipeline-section p.text-muted {
    color: #6e6f7e !important;
}

#bulk-detail-panel {
    border-left: 0;
}

.anatomy-panel {
    background:
        radial-gradient(720px 220px at 0% 0%, rgba(15, 128, 133, 0.08), transparent 70%),
        linear-gradient(180deg, #fffdf8 0%, #fff8ef 100%);
    border: 1px solid #ead9c6;
}

.organ-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.72rem;
}

.organ-card {
    border: 1px solid #ead7c1;
    background: linear-gradient(170deg, #fffefb 0%, #fff5e9 100%);
    border-radius: 12px;
    padding: 0.72rem;
    transition: transform var(--duration-fast) var(--ease-cinematic), box-shadow var(--duration-fast) var(--ease-cinematic), border-color var(--duration-fast) var(--ease-cinematic);
}

.organ-card:hover {
    transform: translateY(-2px);
    border-color: #d1a67f;
    box-shadow: var(--shadow-sm);
}

.organ-card.active {
    border-color: #d16416;
    box-shadow: 0 0 0 2px rgba(209, 100, 22, 0.15);
}

.organ-card.related {
    border-color: #d7b38f;
    background: linear-gradient(170deg, #fffaf4 0%, #fff2e6 100%);
}

.organ-card-main {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0;
    margin: 0 0 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.13rem;
    cursor: pointer;
}

.organ-card-title {
    font-size: 0.93rem;
    font-weight: 700;
    color: #7a3c14;
    letter-spacing: -0.01em;
}

.organ-card-meta {
    font-size: 0.75rem;
    color: #8b7a6a;
}

.organ-cancer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.organ-cancer-chip {
    border: 1px solid #edd2b7;
    background: #fffaf4;
    color: #6e4f37;
    border-radius: 999px;
    padding: 0.1rem 0.52rem;
    font-size: 0.71rem;
    line-height: 1.45;
    transition: all var(--duration-fast) var(--ease-cinematic);
}

.organ-cancer-chip:hover {
    border-color: #cf955d;
    background: #fff0e1;
    color: #5b3519;
}

.organ-cancer-chip.active {
    border-color: #d16416;
    background: #d16416;
    color: #fff;
}

.organ-selection-hint {
    animation: fade-slide-in 0.3s var(--ease-cinematic) both;
}

.organ-selection-hint .alert {
    border: 1px solid rgba(15, 128, 133, 0.22);
    background: linear-gradient(90deg, rgba(15, 128, 133, 0.16), rgba(15, 128, 133, 0.1));
    color: #15585b;
    border-radius: 10px;
    padding: 0.55rem 0.8rem;
    font-size: 0.84rem;
}

.example-summary-table td {
    border-top-color: #ebddcd;
}

.example-summary-table td:first-child {
    font-weight: 700;
}

@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: 0 0 auto;
        min-height: auto;
        position: relative;
        top: auto;
    }

    .main-content {
        width: 100%;
        min-height: auto;
    }

    .main-content > .container-fluid {
        padding: 1.35rem;
    }

    .sidebar .nav-link.active::before {
        left: 0;
    }

    .chart-container,
    .analyze-form,
    .pipeline-section,
    .contact-section {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    h4.mb-4 {
        font-size: 1.2rem;
    }

    .hero-section {
        padding: 1.22rem 1.2rem;
    }

    .hero-section h1 {
        font-size: 1.42rem;
    }

    .hero-tagline,
    .hero-copy p {
        font-size: 0.86rem;
    }

    .organ-cards-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: left;
    }

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

@media (max-width: 480px) {
    .organ-cards-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        font-size: 0.78rem;
    }
}
