html {
    font-size: 14px;
}

:root {
    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --brand-900: #1f3a88;
    --brand-700: #2b4bac;
    --brand-500: #4d6fcb;
    --brand-100: #e9efff;
    --accent-700: #c98238;
    --accent-500: #e2984c;
    --accent-100: #fff2e1;
    --surface: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.85);
    --surface-tint: #f7f9ff;
    --line-soft: rgba(43, 75, 172, 0.1);
    --line-soft-strong: rgba(43, 75, 172, 0.16);
    --shadow-organic-sm: 0 10px 24px rgba(43, 75, 172, 0.08);
    --shadow-organic-md: 0 18px 40px rgba(43, 75, 172, 0.12);
    --shadow-organic-lg: 0 28px 60px rgba(31, 58, 136, 0.16);
    --radius-organic-md: 20px;
    --radius-organic-lg: 28px;
}

body {
    font-family: "Work Sans", sans-serif;
    color: var(--ink-900);
    background:
        radial-gradient(circle at top left, rgba(43, 75, 172, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(226, 152, 76, 0.08), transparent 24%),
        linear-gradient(180deg, #f9fbff 0%, #f4f7ff 46%, #f8fbff 100%);
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #0f172a 0%, #1e293b 45%, #0b1220 100%);
}

.auth-wrapper {
    width: min(420px, 92vw);
}

.auth-card {
    background: var(--surface-soft);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(8px);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: var(--ink-500);
    font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(100, 116, 139, 0.3);
}

.auth-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--ink-500);
}

.demo-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.demo-buttons .btn {
    flex: 1;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 10px;
}

@media (max-width: 520px) {
    .demo-buttons {
        flex-wrap: wrap;
    }
}

.auth-header h2 {
    font-weight: 700;
    margin-top: 8px;
}

.auth-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-700);
    font-weight: 600;
}

.admin-body {
    background:
        radial-gradient(circle at top left, rgba(43, 75, 172, 0.1), transparent 26%),
        radial-gradient(circle at top right, rgba(226, 152, 76, 0.1), transparent 22%),
        linear-gradient(140deg, #fbfcff 0%, #f2f6ff 48%, #fff8ef 100%);
}

.buyer-body {
    background: linear-gradient(140deg, #0f172a 0%, #1e293b 45%, #0b1220 100%);
    color: #f8fafc;
}

.buyer-topbar {
    color: #f8fafc;
}

.buyer-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px 0;
    gap: 16px;
}

.buyer-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.buyer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.buyer-main {
    padding: 32px 40px 56px;
}

.buyer-hero {
    margin-bottom: 32px;
}

.buyer-hero-card {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 22%),
        radial-gradient(circle at top left, rgba(226, 152, 76, 0.16), transparent 28%),
        linear-gradient(145deg, #3556ba 0%, #2b4bac 48%, #244091 100%);
    border-radius: var(--radius-organic-lg);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-organic-lg);
    color: #f8fafc;
}

.buyer-hero-card h1 {
    font-weight: 700;
    margin-bottom: 8px;
    color: #f8fafc;
}

.buyer-hero-card {
    transition: padding 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.buyer-hero-card.is-compact {
    padding-top: 18px;
    padding-bottom: 12px;
}

.buyer-hero-card.is-compact h1 {
    font-size: clamp(1.55rem, 2vw, 2rem);
    margin-bottom: 10px;
}

.buyer-hero-card.is-compact .buyer-search {
    width: 46%;
    margin-top: 10px;
    margin-bottom: 0;
    padding: 8px;
    gap: 8px;
    border-radius: 20px;
}

.buyer-hero-card.is-compact .buyer-search-field .form-control,
.buyer-hero-card.is-compact .buyer-search-submit {
    min-height: 46px;
}

.buyer-hero-card.is-compact .buyer-search-submit {
    min-width: 108px;
}

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

.category-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.96));
    border-radius: var(--radius-organic-md);
    border: 1px solid var(--card-border);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-organic-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.category-card:hover,
.category-card:focus-within {
    transform: translateY(-2px);
    border-color: var(--line-soft-strong);
    box-shadow: var(--shadow-organic-md);
}

.category-card:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.category-card img {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-800);
}

.category-meta {
    font-size: 0.82rem;
    color: var(--ink-500);
}

.buyer-search {
    display: flex;
    gap: 12px;
    margin: 20px auto 16px;
    width: 66.666%;
    background: rgba(255, 255, 255, 0.16);
    padding: 12px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 36px rgba(31, 58, 136, 0.18);
    backdrop-filter: blur(14px);
}

.buyer-search-field {
    position: relative;
    flex: 1;
}

.buyer-search-field .form-control {
    padding-left: 62px;
    padding-right: 16px;
    position: relative;
    z-index: 1;
    flex: 1;
    border: none;
    border-radius: 18px;
    background: #f8fafc;
    min-height: 52px;
    box-shadow: inset 0 0 0 1px rgba(43, 75, 172, 0.14), 0 8px 18px rgba(43, 75, 172, 0.08);
}

.buyer-search-field.has-file .form-control {
    color: var(--ink-500);
}

.buyer-file-btn {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: rgba(43, 75, 172, 0.1);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    z-index: 2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.buyer-file-chip {
    display: none;
    align-items: center;
    position: absolute;
    left: 46px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: auto;
}

.buyer-search-field.has-file .buyer-file-chip {
    display: inline-flex;
}

.buyer-file-chip-pill {
    display: inline-flex;
    align-items: center;
    background: rgba(237, 242, 255, 0.95);
    color: var(--brand-900);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.85rem;
    line-height: 1;
    gap: 8px;
}

.buyer-file-chip-text {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.buyer-search-field.has-file .form-control {
    padding-left: 238px;
}

.buyer-file-chip-remove {
    border: 0;
    background: transparent;
    color: var(--ink-700);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.buyer-file-btn:hover {
    color: #ffffff;
    background: rgba(226, 152, 76, 0.88);
}

.buyer-search.is-dropping {
    outline: 2px dashed var(--brand-500);
    outline-offset: 6px;
    border-radius: 16px;
}

.buyer-upload {
    margin-bottom: 16px;
}

.buyer-items {
    padding-left: 18px;
    color: var(--ink-700);
    margin-bottom: 0;
}

.buyer-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    color: rgba(248, 250, 252, 0.7);
    font-size: 0.9rem;
    text-align: center;
}

.suggestion-pill {
    border: none;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-weight: 600;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.suggestion-pill:hover,
.suggestion-pill:focus {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

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

.buyer-category-kicker {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-500);
    font-weight: 700;
    margin-bottom: 8px;
}

.buyer-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.96));
    border-radius: var(--radius-organic-md);
    padding: 16px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-organic-sm);
    color: var(--ink-900);
}

.buyer-panel h4 {
    font-weight: 700;
    margin-bottom: 8px;
}

.buyer-category-discovery,
.buyer-panel-search-result {
    grid-column: 1 / -1;
}

.buyer-category-discovery {
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 22%),
        radial-gradient(circle at top left, rgba(226, 152, 76, 0.12), transparent 28%),
        linear-gradient(145deg, #3659bf 0%, #2b4bac 58%, #244091 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-organic-md);
    color: #f8fafc;
}

.buyer-category-discovery-head,
.buyer-search-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.buyer-category-discovery-head p,
.buyer-search-result-head p {
    margin: 8px 0 0;
    color: rgba(248, 250, 252, 0.8);
    max-width: 720px;
}

.buyer-category-discovery-head {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.buyer-category-discovery h4,
.buyer-category-discovery h5 {
    color: #f8fafc;
}

.buyer-category-discovery .buyer-category-kicker {
    color: rgba(248, 250, 252, 0.72);
}

.buyer-category-discovery .buyer-category-discovery-head p {
    color: rgba(226, 232, 240, 0.8);
}

.buyer-category-discovery {
    transition: padding 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.buyer-category-discovery.is-condensed {
    padding: 14px 18px;
}

.buyer-category-discovery.is-condensed .buyer-category-discovery-head {
    gap: 10px;
}

.buyer-category-discovery.is-condensed h4 {
    font-size: 1.18rem;
    margin-bottom: 0;
}

.buyer-category-discovery.is-condensed .buyer-category-kicker {
    margin-bottom: 4px;
}

.buyer-category-discovery.is-condensed .buyer-category-discovery-head p {
    max-height: 0;
    opacity: 0;
    margin: 0;
    overflow: hidden;
}

.buyer-category-discovery-toggle {
    white-space: nowrap;
    min-height: 52px;
    border: 1px solid rgba(31, 58, 136, 0.28);
    color: #ffffff;
    background: linear-gradient(135deg, #2B4BAC 0%, #1F3A88 100%);
    font-weight: 700;
    box-shadow: 0 16px 32px rgba(43, 75, 172, 0.22);
    padding: 0.8rem 1.05rem;
    border-radius: 18px;
}

.buyer-category-discovery-toggle:hover,
.buyer-category-discovery-toggle:focus {
    border-color: rgba(22, 43, 104, 0.44);
    color: #ffffff;
    background: linear-gradient(135deg, #244091 0%, #162b68 100%);
    box-shadow: 0 18px 34px rgba(31, 58, 136, 0.28);
    transform: none;
}

.buyer-category-discovery-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(43, 75, 172, 0.16), 0 18px 34px rgba(31, 58, 136, 0.28);
}

.buyer-category-discovery-body {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.buyer-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.buyer-category-grid-actions,
.buyer-product-grid-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.buyer-product-grid-actions {
    margin-top: 18px;
}

.buyer-category-grid-actions[hidden],
.buyer-product-grid-actions[hidden] {
    display: none !important;
}

.buyer-category-card-toggle {
    width: 100%;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.buyer-category-card-toggle:hover,
.buyer-category-card-toggle.is-active {
    transform: translateY(-2px);
    border-color: rgba(43, 75, 172, 0.24);
    box-shadow: var(--shadow-organic-md);
}

.buyer-category-products-shell {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.buyer-category-products-head {
    margin-bottom: 16px;
}

.buyer-category-products-head h5 {
    margin: 0;
    font-weight: 700;
    color: #f8fafc;
}

.buyer-product-grid,
.buyer-detected-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.buyer-product-card,
.buyer-detected-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius-organic-md);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.64), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 255, 0.98));
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-organic-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.buyer-product-card:hover,
.buyer-detected-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-soft-strong);
    box-shadow: var(--shadow-organic-md);
}

.buyer-product-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.buyer-product-badge,
.buyer-product-sku {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.buyer-product-badge {
    background: rgba(43, 75, 172, 0.12);
    color: var(--brand-700);
}

.buyer-product-sku {
    background: rgba(15, 23, 42, 0.06);
    color: var(--ink-500);
}

.buyer-product-card h6,
.buyer-detected-card h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-900);
}

.buyer-product-card p,
.buyer-detected-card p {
    margin: 0;
    color: var(--ink-500);
    line-height: 1.55;
}

.buyer-product-card-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.buyer-product-unit {
    color: var(--ink-500);
    font-size: 0.86rem;
    font-weight: 600;
}

.buyer-search-result-head {
    margin-bottom: 16px;
}

.buyer-panel-search-result {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 20%),
        radial-gradient(circle at top left, rgba(226, 152, 76, 0.12), transparent 24%),
        linear-gradient(145deg, #3659bf 0%, #2b4bac 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-organic-md);
    color: #f8fafc;
}

.buyer-panel-search-result h4,
.buyer-panel-search-result .buyer-category-kicker {
    color: #f8fafc;
}

.buyer-panel-search-result .buyer-category-kicker {
    color: rgba(255, 242, 225, 0.85);
}

.buyer-modal-item-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.buyer-modal-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(43, 75, 172, 0.10);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.buyer-marketplace-modal .modal-content {
    border-radius: var(--radius-organic-lg);
    border: 1px solid rgba(43, 75, 172, 0.08);
    box-shadow: var(--shadow-organic-lg);
}

.buyer-marketplace-modal .modal-header {
    border-bottom-color: rgba(43, 75, 172, 0.14);
}

.buyer-marketplace-modal .modal-body .form-control {
    border-radius: 12px;
}

.buyer-quote-summary-card {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(43, 75, 172, 0.1);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.5), transparent 26%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 255, 0.96));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.buyer-quote-summary-card .buyer-category-kicker {
    display: inline-block;
    margin-bottom: 6px;
}

.buyer-quote-summary-card h6 {
    color: var(--ink-900);
    font-weight: 800;
}

.buyer-quote-summary-card .text-muted {
    color: var(--ink-600) !important;
}

.buyer-modal-item-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.buyer-modal-item-meta {
    color: var(--ink-500);
    font-size: 0.85rem;
    line-height: 1.35;
}

.buyer-modal-item .buyer-quantity-control-inline {
    min-width: 176px;
}

.buyer-modal-item .buyer-quantity-control-inline .input-group {
    flex-wrap: nowrap;
}

.buyer-quantity-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buyer-quantity-control .input-group {
    flex-wrap: nowrap;
    align-items: center;
    padding: 4px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(246, 248, 252, 0.98), rgba(238, 244, 255, 0.98));
    border: 1px solid rgba(43, 75, 172, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.buyer-quantity-btn {
    min-width: 40px;
    height: 40px;
    font-weight: 700;
    border: 0;
    border-radius: 12px !important;
    background: #ffffff;
    color: var(--brand-700);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.buyer-quantity-input {
    font-weight: 700;
    border: 0;
    background: transparent;
    box-shadow: none !important;
    color: var(--ink-900);
}

.buyer-quantity-help {
    color: var(--ink-500);
    font-size: 0.85rem;
    line-height: 1.35;
}

.buyer-panel-hero {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.24), transparent 22%),
        radial-gradient(circle at top left, rgba(226, 152, 76, 0.16), transparent 26%),
        linear-gradient(145deg, #3659bf 0%, #2b4bac 100%);
    box-shadow: var(--shadow-organic-lg);
    color: #f8fafc;
}

.buyer-panel-hero h4 {
    color: #f8fafc;
    text-align: center;
}

.buyer-panel-hero .category-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 24px rgba(31, 58, 136, 0.24);
}

.buyer-panel-hero .category-name {
    color: #f8fafc;
}

.buyer-panel-hero .text-muted {
    color: rgba(248, 250, 252, 0.7) !important;
}

.seller-body {
    background: linear-gradient(140deg, #0f172a 0%, #1e293b 45%, #0b1220 100%);
    color: #f8fafc;
}

.seller-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seller-nav .nav-link {
    color: #cbd5f5;
    padding: 8px 12px;
    font-weight: 600;
    border-radius: 10px;
}

.seller-nav .nav-link.active,
.seller-nav .nav-link:hover {
    color: var(--accent-500);
}

.seller-nav .nav-link.active {
    background: rgba(148, 163, 184, 0.18);
}

.seller-topbar {
    color: #f8fafc;
}

.seller-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seller-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.seller-main {
    padding: 0;
}

.seller-hero-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 22px 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    color: var(--ink-900);
}

.seller-hero {
    margin-bottom: 24px;
}

.seller-hero + .seller-grid {
    margin-top: 24px;
}

.seller-hero-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-700);
    font-weight: 600;
}

.hero-score {
    background: #1e293b;
    color: #f8fafc;
    border-radius: 16px;
    padding: 12px 16px;
    text-align: center;
    min-width: 120px;
}

.hero-score strong {
    font-size: 1.6rem;
    display: block;
}

.seller-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.seller-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.seller-stats .stat-card + .stat-card {
    margin-top: 0;
}

.seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.seller-kanban-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 18px;
    margin-left: -40px;
    margin-right: -40px;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 6px;
    max-width: none;
    width: calc(100% + 80px);
}

.seller-kanban {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 14px;
    min-width: max-content;
}

.kanban-column {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 20%),
        linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(31, 58, 136, 0.98));
    border: 1px solid rgba(43, 75, 172, 0.16);
    border-radius: 22px;
    padding: 14px;
    width: clamp(220px, 18vw, 252px);
    min-width: clamp(220px, 18vw, 252px);
    flex: 0 0 clamp(220px, 18vw, 252px);
    height: min(72vh, 760px);
    min-height: 420px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(31, 58, 136, 0.16);
}

.kanban-column::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

.kanban-column-brand {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-column-brand-soft {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-column-accent {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-column-accent-soft {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-column-neutral {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-column-warning {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-column-danger {
    background: linear-gradient(180deg, rgba(43, 75, 172, 0.98), rgba(28, 49, 118, 0.98));
}

.kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.kanban-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.kanban-count {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.kanban-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.kanban-body::-webkit-scrollbar {
    width: 8px;
}

.kanban-body::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
}

.kanban-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 900px) {
    .seller-kanban-scroll {
        margin-left: -24px;
        margin-right: -24px;
        padding-left: 24px;
        padding-right: 24px;
        width: calc(100% + 48px);
    }
}

.kanban-empty {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    padding: 10px 8px;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    text-align: center;
}

.kanban-card {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: var(--surface);
    text-decoration: none;
    border-radius: 18px;
    padding: 12px 14px;
    color: var(--ink-900);
    border: 1px solid rgba(43, 75, 172, 0.08);
    box-shadow: var(--shadow-organic-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.kanban-card:hover,
.kanban-card:focus {
    background: var(--brand-700);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(43, 75, 172, 0.35);
    transform: translateY(-2px);
}

.kanban-card:hover .kanban-meta,
.kanban-card:focus .kanban-meta,
.kanban-card:hover .kanban-title,
.kanban-card:focus .kanban-title {
    color: #ffffff;
}

.kanban-title {
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--ink-900);
}

.kanban-meta {
    color: var(--ink-700);
    font-size: 0.85rem;
    line-height: 1.35;
}

.kanban-age {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.kanban-dot-green {
    background: #22c55e;
}

.kanban-dot-yellow {
    background: var(--accent-500);
}

.kanban-dot-red {
    background: #ef4444;
}

.quote-modal-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.quote-modal-subtext {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-500);
    font-size: 0.85rem;
}

.quote-modal-subtext-warning {
    color: #92400e;
}

.quote-modal-buyer {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
}

.quote-modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.panel-title-sm {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.kanban-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}

.kanban-chat-empty {
    color: var(--ink-500);
    font-size: 0.85rem;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    padding: 12px;
}

.kanban-chat-message {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--ink-900);
}

.kanban-chat-meta {
    font-size: 0.75rem;
    color: var(--ink-500);
    margin-bottom: 6px;
}

.kanban-chat-text {
    font-size: 0.9rem;
    color: var(--ink-800);
}

.seller-grid-spaced {
    margin-top: 24px;
}

.seller-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 255, 0.96));
    border-radius: var(--radius-organic-md);
    padding: 16px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-organic-sm);
    color: var(--ink-900);
}

.seller-quote-table {
    color: var(--ink-900);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-organic-sm);
    --seller-table-border: rgba(43, 75, 172, 0.08);
    --seller-table-row: rgba(255, 255, 255, 0.86);
    --seller-table-row-alt: rgba(243, 247, 255, 0.92);
}

.seller-quote-table th,
.seller-quote-table td {
    border-color: var(--seller-table-border);
}

.seller-quote-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-700);
    background: rgba(43, 75, 172, 0.08);
    border-bottom: 1px solid var(--seller-table-border);
}

.seller-quote-table tbody tr {
    background: var(--seller-table-row);
}

.seller-quote-table tbody tr:nth-child(even) {
    background: var(--seller-table-row-alt);
}

.seller-quote-table tbody td {
    border-top: 1px solid var(--seller-table-border);
}

.quote-status-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(43, 75, 172, 0.08);
    color: var(--brand-700);
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.seller-quote-modal {
    max-width: 70vw;
}

.buyer-quote-modal {
    max-width: 70vw;
}

@media (max-width: 1200px) {
    .seller-quote-modal {
        max-width: 90vw;
    }

    .buyer-quote-modal {
        max-width: 90vw;
    }

    .seller-report-chart-wide {
        grid-column: span 1;
    }
}

.seller-panel h4 {
    font-weight: 700;
    margin-bottom: 10px;
}

.seller-panel ul {
    padding-left: 18px;
    color: var(--ink-500);
    margin-bottom: 16px;
}

.seller-summary {
    display: flex;
    gap: 18px;
    margin: 16px 0;
}

.seller-summary span {
    color: var(--ink-500);
    font-size: 0.85rem;
    display: block;
}

.seller-summary strong {
    font-size: 1.2rem;
}

.seller-report-toolbar {
    align-items: center;
    justify-content: space-between;
}

.seller-report-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.seller-report-filters .form-label {
    font-size: 0.82rem;
    color: var(--ink-500);
}

.seller-report-filters .form-select {
    min-width: 180px;
}

.seller-report-stats {
    margin-top: 0;
}

.seller-report-grid {
    align-items: stretch;
}

.seller-report-chart-card {
    min-height: 380px;
}

.seller-report-chart-wide {
    grid-column: span 2;
}

.seller-report-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.seller-report-panel-head h4 {
    margin-bottom: 6px;
}

.seller-report-chart-wrap {
    position: relative;
    min-height: 280px;
}

.seller-report-funnel {
    display: grid;
    gap: 12px;
}

.seller-report-funnel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 12px 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: var(--shadow-organic-sm);
}

.seller-report-funnel-item span {
    color: var(--ink-700);
}

.seller-report-funnel-item strong {
    font-size: 1.1rem;
}

.seller-report-metric-list {
    display: grid;
    gap: 4px;
}

.seller-report-metric-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(43, 75, 172, 0.08);
}

.seller-report-metric-row:last-child {
    border-bottom: 0;
}

.seller-report-metric-row span {
    color: var(--ink-700);
}

.seller-report-list {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-700);
}

.seller-report-list li + li {
    margin-top: 8px;
}

.seller-report-table-wrap {
    border-radius: 14px;
    overflow: hidden;
}

.seller-cta {
    margin-top: 24px;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-content > section + section,
.buyer-main > section + section,
.seller-main > section + section {
    margin-top: 24px;
}

.admin-sidebar {
    width: 248px;
    background:
        radial-gradient(circle at top left, rgba(77, 111, 203, 0.12), transparent 30%),
        linear-gradient(180deg, #f9fbff 0%, #eef3ff 100%);
    color: var(--brand-900);
    padding: 30px 22px;
    transition: width 0.25s ease, padding 0.25s ease;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
    border-right: 1px solid rgba(43, 75, 172, 0.12);
    box-shadow: 14px 0 32px rgba(43, 75, 172, 0.08);
}

.brand-block {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-logo {
    display: block;
    width: 188px;
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    background: #ffffff;
    padding: 12px 14px;
    box-shadow: 0 14px 30px rgba(43, 75, 172, 0.12);
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
    white-space: nowrap;
}

.btn-menu-toggle {
    padding: 4px 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-sub {
    font-size: 0.92rem;
    color: var(--brand-700);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}


.admin-sidebar .nav-link {
    color: var(--brand-900);
    padding: 11px 14px;
    font-weight: 600;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link:hover {
    color: var(--brand-700);
    transform: translateX(2px);
}

.admin-sidebar .nav-link.active {
    background: rgba(77, 111, 203, 0.11);
    border-color: rgba(77, 111, 203, 0.16);
    box-shadow: 0 10px 18px rgba(43, 75, 172, 0.08);
}

.admin-sidebar .nav-link:hover {
    background: rgba(77, 111, 203, 0.08);
    border-color: rgba(77, 111, 203, 0.12);
}

.admin-main {
    flex: 1;
    padding: 32px 40px 40px;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.buyer-layout .admin-main {
    padding-top: 10px;
}

.buyer-layout .admin-topbar {
    margin-bottom: 8px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    white-space: nowrap;
}

.admin-shell.sidebar-collapsed .admin-sidebar {
    width: 72px;
    padding: 28px 12px;
}

.admin-shell.sidebar-collapsed .admin-sidebar .brand-sub,
.admin-shell.sidebar-collapsed .admin-sidebar .nav,
.admin-shell.sidebar-collapsed .admin-sidebar .category-sidebar {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-12px);
}

.admin-shell.sidebar-collapsed .admin-sidebar .brand-mark {
    display: none;
}

.admin-shell.sidebar-collapsed .admin-sidebar .brand-logo {
    width: 48px;
    padding: 4px;
}

.menu-panel {
    position: absolute;
    top: 92px;
    left: 12px;
    right: 12px;
    z-index: 3;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(15, 23, 42, 0.92);
    padding: 10px 12px;
    box-shadow: 0 20px 30px rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-panel-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-panel .menu-nav {
    display: flex;
    flex-direction: column !important;
    flex-wrap: nowrap;
    align-items: stretch;
    max-height: calc(100vh - 240px);
    overflow-y: auto;
    padding-right: 6px;
}

.menu-panel .menu-nav .nav-link {
    display: block;
    width: 100%;
}

.menu-divider {
    height: 1px;
    background: rgba(148, 163, 184, 0.25);
    margin: 8px 0;
}

.category-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.65));
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.category-title {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: #e2e8f0;
}

.category-count {
    background: rgba(226, 232, 240, 0.15);
    color: #e2e8f0;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-filter .form-control {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

.category-filter .form-control::placeholder {
    color: rgba(226, 232, 240, 0.6);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.6) transparent;
}

.category-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border-radius: 0;
}

.category-tree-nested {
    margin-left: 12px;
    border-left: 1px solid rgba(148, 163, 184, 0.2);
    padding-left: 10px;
    list-style: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border-radius: 0;
}

.category-item::marker {
    content: '';
}

.category-item.is-filtered {
    display: none;
}

.category-node {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    padding: 2px 0;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    background: transparent;
    border: 0;
}

.category-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    flex: 0 0 auto;
}

.category-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

.category-list .category-node {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 2px 0;
}

.category-node:hover {
    background: transparent;
    color: #f8fafc;
}

.category-node[aria-expanded='true'] {
    background: transparent;
}

.category-children {
    padding-left: 4px;
}

.category-empty {
    color: rgba(226, 232, 240, 0.6);
    font-size: 0.85rem;
}

.category-modal {
    background: #0f172a;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

.category-modal .modal-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.category-modal .modal-title {
    font-weight: 700;
    color: #f8fafc;
}

.category-modal-subtitle {
    margin: 4px 0 0;
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.85rem;
}

.category-modal-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.6);
}

.category-modal-label {
    font-weight: 600;
    color: #f8fafc;
}

.category-modal-nested {
    margin: 8px 0 0 10px;
    padding-left: 12px;
    border-left: 1px dashed rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.marketplace-hero {
    margin-bottom: 28px;
}

.marketplace-hero-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.88));
    border-radius: 26px;
    padding: 28px;
    color: #f8fafc;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}

.marketplace-hero-card h1 {
    font-weight: 700;
    margin-bottom: 6px;
}

.marketplace-search {
    display: flex;
    gap: 12px;
    margin: 20px 0 12px;
}

.marketplace-search .form-control {
    background: rgba(248, 250, 252, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.3);
    color: #f8fafc;
}

.marketplace-search .form-control::placeholder {
    color: rgba(226, 232, 240, 0.7);
}

.marketplace-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.marketplace-hint {
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.85rem;
}

.marketplace-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.marketplace-suggestions span {
    color: rgba(226, 232, 240, 0.7);
    font-size: 0.85rem;
}

.marketplace-suggestions .suggestion-pill {
    background: rgba(248, 250, 252, 0.15);
    color: #e2e8f0;
}

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

.marketplace-panel {
    background: var(--surface);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.marketplace-panel h4 {
    font-weight: 700;
    margin-bottom: 8px;
}

.page-title {
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    color: var(--ink-500);
    margin-bottom: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-left: auto;
    flex-wrap: wrap;
}

.notification-dropdown {
    position: relative;
}

.role-switcher {
    position: relative;
}

.role-switcher-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--brand-900);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    min-width: 148px;
    justify-content: space-between;
}

.role-switcher-button:hover,
.role-switcher-button:focus {
    background: #f8fafc;
    color: var(--brand-900);
    border-color: rgba(15, 23, 42, 0.28);
}

.role-switcher-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.role-switcher-current {
    font-weight: 600;
}

.role-switcher-menu {
    min-width: 220px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.role-switcher-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    color: #f8fafc;
}

.role-switcher-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    white-space: normal;
    padding: 12px 16px;
}

.role-switcher-item.is-active {
    background: rgba(59, 130, 246, 0.08);
}

.role-switcher-item:hover {
    background: rgba(59, 130, 246, 0.12);
}

.notification-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--brand-900);
    border-color: rgba(15, 23, 42, 0.16);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.notification-button:hover,
.notification-button:focus {
    background: #f8fafc;
    color: var(--brand-900);
    border-color: rgba(15, 23, 42, 0.28);
}

.notification-button-icon {
    font-size: 1rem;
    line-height: 1;
}

.notification-button-badge {
    margin-left: 2px;
}

.notification-menu {
    min-width: 320px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.notification-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    color: #f8fafc;
}

.notification-menu-header a {
    color: #e2e8f0;
    font-size: 0.9rem;
    text-decoration: none;
}

.notification-menu-header a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.notification-menu-empty {
    padding: 16px;
    color: var(--ink-500);
}

.notification-menu-item {
    white-space: normal;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.notification-menu-item:last-child {
    border-bottom: 0;
}

.notification-menu-item.is-unread {
    background: rgba(59, 130, 246, 0.08);
}

.notification-menu-item:hover {
    background: rgba(59, 130, 246, 0.12);
}

.notification-menu-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.notification-menu-item-text {
    color: var(--ink-500);
    font-size: 0.92rem;
}

.notifications-page {
    max-width: 1080px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: #ffffff;
}

.notification-item.is-unread {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.05);
}

.notification-item-main {
    flex: 1;
    min-width: 0;
}

.notification-item-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.notification-item-message {
    margin: 0;
    color: var(--ink-700);
}

.notification-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-badge {
    padding: 6px 14px;
    background: rgba(77, 111, 203, 0.1);
    color: var(--brand-700);
    border: 1px solid rgba(77, 111, 203, 0.16);
    border-radius: 999px;
    font-size: 0.9rem;
    box-shadow: 0 8px 18px rgba(43, 75, 172, 0.06);
}

.btn-ghost {
    background: rgba(77, 111, 203, 0.1);
    color: var(--brand-700);
    border: 1px solid rgba(77, 111, 203, 0.14);
    padding: 8px 14px;
    font-weight: 600;
    box-shadow: 0 10px 18px rgba(43, 75, 172, 0.08);
}

.btn-ghost:hover,
.btn-ghost:focus {
    background: rgba(77, 111, 203, 0.16);
    border-color: rgba(77, 111, 203, 0.2);
    color: var(--brand-900);
}

.btn-primary {
    background-color: rgba(77, 111, 203, 0.12);
    border-color: rgba(77, 111, 203, 0.14);
    color: var(--brand-700);
    box-shadow: 0 12px 20px rgba(43, 75, 172, 0.08);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: rgba(77, 111, 203, 0.18) !important;
    border-color: rgba(77, 111, 203, 0.22) !important;
    color: var(--brand-900) !important;
    box-shadow: 0 14px 24px rgba(43, 75, 172, 0.1) !important;
}

.btn-outline-primary {
    color: var(--brand-700);
    background: rgba(77, 111, 203, 0.08);
    border-color: rgba(43, 75, 172, 0.2);
    box-shadow: 0 10px 18px rgba(43, 75, 172, 0.06);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: rgba(77, 111, 203, 0.14) !important;
    border-color: rgba(43, 75, 172, 0.24) !important;
    color: var(--brand-900) !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(43, 75, 172, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(43, 75, 172, 0.16);
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    border-radius: var(--radius-organic-md);
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-organic-sm);
    color: var(--ink-900);
}

.stat-card-action {
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-action:hover,
.stat-card-action:focus {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(30, 64, 175, 0.3);
    transform: translateY(-2px);
}

.stat-card-action:hover .stat-text,
.stat-card-action:focus .stat-text,
.stat-card-action:hover .stat-value,
.stat-card-action:focus .stat-value {
    color: #ffffff;
}

.stat-card-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-card-inline .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    width: 68px;
    flex: 0 0 68px;
    text-align: center;
}

.stat-card-inline .stat-text {
    color: var(--ink-700);
    font-size: 0.95rem;
    line-height: 1.4;
}

.stat-card + .stat-card {
    margin-top: 18px;
}

.profile-card {
    padding: 10px 12px;
    box-shadow: none;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f8fafc;
}

.profile-card + .profile-card {
    margin-top: 12px;
}

.profile-card h4 {
    font-size: 1rem;
    margin-bottom: 0;
}

.profile-grid {
    margin-top: 6px;
}

.profile-item {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: var(--shadow-organic-sm);
    color: var(--ink-900);
}

.profile-value {
    font-size: 1rem;
    margin-bottom: 0;
}

.profile-list {
    margin: 0;
}

.profile-list .list-group-item {
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 10px 12px;
    margin-bottom: 8px;
}

.profile-list .list-group-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: var(--ink-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.stat-note {
    color: var(--ink-500);
    font-size: 0.75rem;
}

.panel-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
    border-radius: var(--radius-organic-md);
    padding: 18px 20px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-organic-sm);
    color: var(--ink-900);
}

.panel-card + .panel-card {
    margin-top: 18px;
}

.panel-header h5 {
    font-weight: 700;
    margin-bottom: 6px;
}

.panel-header p {
    color: var(--ink-500);
    margin-bottom: 16px;
}

.approvals-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.approval-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.approval-panel-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.approval-doc {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(15, 23, 42, 0.08);
    color: var(--ink-700);
}

.status-pending {
    background: rgba(251, 191, 36, 0.16);
    color: #92400e;
}

.status-approved,
.status-processed {
    background: rgba(43, 75, 172, 0.12);
    color: var(--brand-700);
}

.status-rejected,
.status-failed {
    background: rgba(248, 113, 113, 0.16);
    color: #991b1b;
}

.status-missing {
    background: rgba(248, 113, 113, 0.16);
    color: #991b1b;
}

.status-review {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.doc-status-text {
    font-weight: 600;
}

.doc-status-missing {
    color: #b91c1c;
}

.doc-status-review {
    color: #6b7280;
}

.doc-status-approved {
    color: var(--brand-700);
}

.type-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(43, 75, 172, 0.12);
    color: var(--brand-700);
}

.type-buyer {
    background: rgba(43, 75, 172, 0.12);
    color: var(--brand-700);
}

.type-seller {
    background: rgba(226, 152, 76, 0.14);
    color: var(--accent-700);
}

@media (max-width: 768px) {
    .approvals-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .approval-panel-header {
        flex-direction: column;
    }
}

.iivsa-modal {
    border-radius: var(--radius-organic-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow-organic-lg);
    border: 1px solid var(--line-soft);
    background: var(--surface);
    color: var(--ink-900);
}

.iivsa-modal-title {
    font-weight: 700;
    color: var(--brand-700);
}

.iivsa-modal-body {
    color: var(--ink-700);
    font-size: 0.95rem;
}

.iivsa-modal-confirm {
    background: rgba(77, 111, 203, 0.12);
    color: var(--brand-700);
    border-radius: 999px;
    border: 1px solid rgba(77, 111, 203, 0.14);
    padding: 10px 18px;
    font-weight: 600;
    box-shadow: 0 10px 18px rgba(43, 75, 172, 0.08);
}

.iivsa-modal-confirm:hover {
    background: rgba(77, 111, 203, 0.18);
    color: var(--brand-900);
}

.iivsa-modal-cancel {
    background: #ffffff;
    color: var(--ink-700);
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.16);
    padding: 10px 18px;
    font-weight: 600;
}

.iivsa-modal-cancel:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
}

.swal2-icon.swal2-error,
.swal2-icon.swal2-warning,
.swal2-icon.swal2-success,
.swal2-icon.swal2-info {
    border-color: var(--brand-700);
    color: var(--brand-700);
}

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

.module-item {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-organic-sm);
}

.module-item h6 {
    font-weight: 700;
    margin-bottom: 6px;
}

.admin-dashboard-hero {
    padding: 22px 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 28%),
        radial-gradient(circle at top right, rgba(226, 152, 76, 0.14), transparent 24%),
        linear-gradient(145deg, #3556ba 0%, #2b4bac 50%, #244091 100%);
    color: #f8fafc;
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-organic-lg);
    box-shadow: var(--shadow-organic-lg);
}

.admin-dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    filter: blur(4px);
    pointer-events: none;
}

.admin-dashboard-hero h2,
.admin-dashboard-hero .text-muted,
.admin-dashboard-hero .form-label {
    color: #f8fafc !important;
}

.admin-dashboard-hero .text-muted {
    opacity: 0.8;
}

.admin-dashboard-hero-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.admin-dashboard-kicker {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand-700);
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-dashboard-filters {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 10px 12px;
    backdrop-filter: blur(12px);
}

.admin-dashboard-filters .form-select {
    min-width: 180px;
    border: 0;
    box-shadow: none;
}

.admin-dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.admin-dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.admin-dashboard-summary div {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 12px 14px;
    backdrop-filter: blur(6px);
}

.admin-dashboard-summary span {
    display: block;
    font-size: 0.8rem;
    color: rgba(248, 250, 252, 0.72);
    margin-bottom: 4px;
}

.admin-dashboard-summary strong {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.admin-dynamic-card {
    border: 1px solid rgba(148, 163, 184, 0.18);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition:
        opacity 0.7s ease,
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.admin-kpi-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(43, 75, 172, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f8fafc 100%);
}

.admin-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-700) 0%, #6f88da 55%, var(--accent-500) 100%);
}

.admin-kpi-card h3 {
    font-size: 1.95rem;
    font-weight: 700;
}

.admin-filter-card .admin-dashboard-filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
}

.admin-filter-card .admin-dashboard-filters .form-select {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.admin-filter-card .admin-dashboard-filters .btn {
    width: 100%;
}

@media (min-width: 1200px) {
    .admin-kpi-col {
        flex: 0 0 auto;
        width: 14.285714%;
    }
}

.admin-priority-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-priority-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-priority-item:hover,
.admin-priority-item:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    border-color: rgba(43, 75, 172, 0.35);
}

.admin-priority-item strong {
    display: block;
    margin-bottom: 4px;
}

.admin-priority-item p {
    color: var(--ink-500);
    font-size: 0.9rem;
}

.admin-priority-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
}

.admin-market-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.admin-market-item {
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    padding: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.admin-market-item span {
    display: block;
    color: var(--ink-500);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.admin-market-item strong {
    font-size: 1.2rem;
    font-weight: 700;
}

.admin-chart-wrap {
    position: relative;
    min-height: 290px;
    border-radius: 18px;
    padding: 14px;
    background:
        radial-gradient(circle at top left, rgba(43, 75, 172, 0.08), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.14);
    overflow: hidden;
}

.admin-chart-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, transparent 26%);
    pointer-events: none;
}

.admin-chart-wrap canvas {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.admin-chart-wrap.is-chart-ready canvas {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.admin-chart-wrap-donut {
    min-height: 320px;
}

.admin-dashboard-modules {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-dashboard-module-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    background:
        radial-gradient(circle at top right, rgba(43, 75, 172, 0.08), transparent 38%),
        #f8fafc;
}

.admin-dashboard-module-link:hover,
.admin-dashboard-module-link:focus {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    border-color: rgba(43, 75, 172, 0.35);
}

.admin-dashboard-module-metric {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: 4px;
}

.admin-dashboard-module-link p {
    color: var(--ink-500);
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .admin-dashboard-hero-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-market-grid {
        grid-template-columns: 1fr;
    }

}

.seller-grid-two {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.catalog-description-col {
    width: 45%;
}

.rating-form {
    display: block;
}

.rating-criteria {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.rating-criteria-label {
    font-size: 0.9rem;
    color: var(--ink-700);
}

.rating-stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    color: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    transition: color 0.15s ease;
    -webkit-text-stroke: 1.5px #94a3b8;
}

.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label {
    color: var(--accent-500);
    -webkit-text-stroke-color: var(--accent-500);
}

.rating-breakdown {
    display: grid;
    gap: 6px;
}

.rating-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--ink-700);
}

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

    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .admin-main {
        padding: 24px;
    }

    .admin-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-left {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-end;
        align-self: flex-end;
    }

    .buyer-topbar,
    .buyer-main {
        padding: 24px;
    }

    .seller-topbar,
    .seller-main {
        padding: 24px;
    }

    .seller-hero-head {
        flex-direction: column;
    }

    .seller-report-toolbar,
    .seller-report-filters {
        align-items: stretch;
    }

    .seller-report-filters .form-select,
    .seller-report-filters .btn,
    .seller-report-toolbar > .btn {
        width: 100%;
    }

    .buyer-search,
    .buyer-hero-card.is-compact .buyer-search {
        flex-direction: column;
        width: 100%;
    }

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

    .buyer-category-discovery-head,
    .buyer-search-result-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .marketplace-search {
        flex-direction: column;
    }
}

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

    .buyer-category-grid,
    .buyer-product-grid,
    .buyer-detected-grid {
        grid-template-columns: 1fr;
    }

    .buyer-modal-item,
    .buyer-product-card-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .buyer-category-discovery-toggle {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .buyer-search-field.has-file .form-control {
        padding-left: 16px;
        padding-top: 60px;
    }

    .buyer-file-chip {
        left: 14px;
        top: 18px;
        transform: none;
    }

    .buyer-file-chip-text {
        max-width: 120px;
    }
}


.site-legal-footer {
    margin: 24px 24px 28px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.auth-legal-footer {
    margin: 18px auto 0;
    text-align: center;
}

.panel-legal-footer {
    margin-top: 0;
}

.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: center;
    font-size: 0.88rem;
    color: #64748b;
}

.legal-links-label {
    font-weight: 700;
    color: #0f172a;
}

.legal-links a {
    color: #1f3a88;
    text-decoration: none;
    font-weight: 600;
}

.legal-links a:hover {
    text-decoration: underline;
}

.legal-links-light,
.legal-links-light .legal-links-label {
    color: rgba(248, 250, 252, 0.8);
}

.legal-links-light a {
    color: #f8fafc;
}

.legal-page {
    min-height: 100vh;
    font-family: "Work Sans", sans-serif;
    color: #0f172a;
    background: linear-gradient(180deg, #f7f9ff 0%, #eef4ff 100%);
}

.legal-shell {
    width: min(1180px, 94vw);
    margin: 0 auto;
    padding: 36px 0 56px;
}

.legal-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(145deg, #3659bf 0%, #2b4bac 58%, #244091 100%);
    color: #f8fafc;
    box-shadow: 0 24px 58px rgba(31, 58, 136, 0.18);
}

.legal-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(2rem, 3vw, 3rem);
    color: #ffffff;
}

.legal-hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(248, 250, 252, 0.84);
    line-height: 1.6;
}

.legal-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 242, 225, 0.84);
    font-weight: 700;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.legal-card,
.legal-nav-card,
.legal-document-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    border: 1px solid rgba(43, 75, 172, 0.1);
    box-shadow: 0 16px 34px rgba(43, 75, 172, 0.08);
}

.legal-card {
    padding: 22px;
}

.legal-card h2 {
    margin: 0 0 10px;
    font-size: 1.12rem;
}

.legal-card p {
    margin: 0 0 18px;
    color: #475569;
    line-height: 1.6;
}

.legal-content-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
}

.legal-nav-card {
    padding: 18px;
    position: sticky;
    top: 24px;
}

.legal-nav-card h2 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.legal-nav-link {
    display: block;
    padding: 10px 12px;
    border-radius: 14px;
    color: #334155;
    text-decoration: none;
    font-weight: 600;
}

.legal-nav-link:hover,
.legal-nav-link.is-active {
    background: #edf3ff;
    color: #1f3a88;
}

.legal-document-card {
    padding: 28px;
}

.legal-document-body {
    color: #334155;
    line-height: 1.78;
    white-space: normal;
}

.legal-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .legal-content-grid {
        grid-template-columns: 1fr;
    }

    .legal-nav-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .legal-hero {
        flex-direction: column;
    }

    .legal-links {
        gap: 10px 14px;
    }
}
