/* H2GO - 수소거래 플랫폼 스타일 */
/* 토큰 정의는 colors_and_type.css 에서 관리됩니다 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-black);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
    /* 노치·홈 인디케이터 영역 */
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}

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

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    filter: blur(48px);
}

body::before {
    top: -12vh;
    left: -10vw;
    width: 48vw;
    height: 48vw;
    min-width: 280px;
    min-height: 280px;
    background:
        radial-gradient(circle at 40% 40%, var(--ambient-primary) 0%, transparent 55%),
        radial-gradient(circle at 70% 65%, var(--ambient-secondary) 0%, transparent 45%);
    opacity: 0.85;
    animation: ambientFloatA 28s ease-in-out infinite alternate;
}

body::after {
    right: -12vw;
    bottom: -16vh;
    width: 52vw;
    height: 52vw;
    min-width: 300px;
    min-height: 300px;
    background:
        radial-gradient(circle at 45% 45%, var(--ambient-secondary) 0%, transparent 50%),
        radial-gradient(circle at 60% 55%, var(--ambient-primary) 0%, transparent 40%);
    opacity: 0.55;
    animation: ambientFloatB 32s ease-in-out infinite alternate;
}

@keyframes ambientFloatA {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    100% {
        transform: translate3d(1.5vw, 2vh, 0) scale(1.03);
    }
}

@keyframes ambientFloatB {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-1.2vw, -1.5vh, 0);
    }
}

/* ------------------------------------------------------------
   H2GO 텍스트 로고(배경 없는 로고)
   - 사용처: `index.html`, `dashboard.html`의 `.brand-mark`
   - 목적: PNG 로고의 검정 배경(이미지 자체)을 제거하고,
           어디서나 동일한 “로고만” 표시되도록 통일
------------------------------------------------------------ */
.brand-mark {
    display: inline-flex;
    align-items: baseline;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    user-select: none;
}

.brand-h2 { color: var(--h2-blue); }
.brand-go { color: var(--go-gray); }

.brand-mark--xl { font-size: 3rem; }
.brand-mark--lg { font-size: 2rem; }

/* 로그인 전용 화면 */
.auth-only {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-black);
}

.auth-only-main {
    width: 100%;
    max-width: 520px;
}

.auth-only-card {
    background: color-mix(in srgb, var(--bg-card) 96%, transparent);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
}

/* 모바일에서 로그인 카드 여백/글자 크기 가독성 조정
   사용처: `index.html`의 로그인/회원가입 카드(`.auth-only-card`) */
@media (max-width: 480px) {
    .auth-only {
        padding: 1.25rem;
    }

    .auth-only-card {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }

    .brand-mark--xl {
        font-size: 2.4rem;
    }
}

.auth-only-brand {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-tagline {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

.auth-feature-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
}

.auth-feature-chips [role="listitem"] {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--surface-soft-border);
    background: var(--surface-soft);
    color: var(--text-muted);
}

.auth-only-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.auth-only-links {
    margin-top: 1rem;
}

/* 로그인 ↔ 회원가입 화면 전환 */
.auth-sections-stack {
    position: relative;
    margin-top: 0.25rem;
}

.auth-section {
    transition:
        opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.38s;
}

.auth-section:not(.auth-section--active) {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    pointer-events: none;
    visibility: hidden;
}

.auth-section--active {
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .auth-section {
        transition: opacity 0.12s ease, visibility 0.12s ease;
    }

    .auth-section:not(.auth-section--active) {
        transform: none;
    }
}

.is-hidden {
    display: none !important;
}

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

.auth-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-black);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
}

/* 로그인/회원가입 화면에서도 동일한 테마 토글 사용 */
.theme-toggle-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    min-height: 2.25rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.25;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.theme-toggle-switch:hover,
.theme-toggle-switch:focus-visible {
    border-color: var(--h2-blue);
    outline: none;
}

.theme-toggle-track {
    position: relative;
    width: 34px;
    height: 18px;
    border-radius: var(--radius-pill);
    background: var(--bg-black);
    border: 1px solid var(--surface-soft-border);
    overflow: hidden;
}

.theme-toggle-thumb {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--h2-blue-light);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.35);
    transition: transform 0.18s ease;
}

.theme-toggle-switch[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(14px);
}

.theme-toggle-label {
    min-width: 2.75rem;
    text-align: left;
    white-space: nowrap;
}

.auth-form select:focus {
    outline: none;
    border-color: var(--h2-blue);
}

/* 네비게이션 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--surface-overlay);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    flex-wrap: wrap;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--h2-blue-light);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-white);
}

/* 히어로 섹션 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.15), transparent),
        var(--bg-black);
}

.auth-only-main,
.navbar,
.dashboard-main {
    position: relative;
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after {
        animation: none;
    }
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.hero-logo {
    height: 80px;
    width: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3));
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    min-width: 160px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    min-height: 2.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.15s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    word-break: keep-all;
}

.btn:active {
    transform: scale(0.96);
    transition-duration: 0.08s;
}

.btn-primary {
    background: var(--h2-blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--h2-blue-dark);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.28);
}

.btn-secondary {
    background: var(--go-gray);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--go-gray-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.hero-visual {
    position: absolute;
    bottom: 10%;
    right: 10%;
    opacity: 0.3;
}

.hydrogen-molecule {
    width: 200px;
    height: 200px;
    border: 2px solid var(--h2-blue);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* 이용 대상 섹션 */
.users-section {
    padding: 6rem 2rem;
    background: var(--bg-dark);
}

.users-section h2 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
}

.user-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-card:hover {
    border-color: color-mix(in srgb, var(--h2-blue) 45%, var(--border-color));
    box-shadow: var(--shadow-card);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.supplier-icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--h2-blue-light);
}

.transporter-icon {
    background: rgba(107, 114, 128, 0.3);
    color: var(--go-gray);
}

.consumer-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--h2-blue);
}

.user-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.user-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-card {
    flex: 1;
    background: var(--h2-blue);
    color: white;
    padding: 0.7rem 1rem;
    min-height: 2.65rem;
    font-size: 0.9rem;
    line-height: 1.35;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.btn-card:hover {
    background: var(--h2-blue-dark);
}

.btn-card-outline {
    flex: 1;
    background: transparent;
    color: var(--h2-blue-light);
    border: 1px solid var(--h2-blue);
    padding: 0.7rem 1rem;
    min-height: 2.65rem;
    font-size: 0.9rem;
    line-height: 1.35;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.btn-card-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.card-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
}

.card-hint a {
    color: var(--h2-blue-light);
    text-decoration: none;
}

.card-hint a:hover {
    text-decoration: underline;
}

/* 기능 섹션 */
.features-section {
    padding: 6rem 2rem;
    background: var(--bg-black);
}

.features-section h2 {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-item {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: border-color 0.2s;
}

.feature-item:hover {
    border-color: var(--h2-blue);
}

.feature-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--h2-blue);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.feature-item h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 소개 섹션 */
.about-section {
    padding: 6rem 2rem;
    background: var(--bg-black);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

.about-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.about-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.about-features li {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

/* 푸터 */
.footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-logo {
    height: 36px;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
    box-shadow: var(--shadow-card);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-form .form-hint-inline {
    display: inline;
    margin-left: 0.35rem;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.9;
}

.auth-form .form-hint-block {
    margin: -0.2rem 0 0.55rem;
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 400;
    color: var(--text-muted);
    opacity: 0.95;
}

.auth-form input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-black);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 1rem;
    font-family: inherit;
}

.auth-form select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-black);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 1rem;
    font-family: inherit;
}

.auth-checkbox-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.auth-checkbox-group label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-black);
    color: var(--text-white);
    font-size: 0.86rem;
    cursor: pointer;
}

.auth-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 회원가입 — 사업자분류 (라디오 없이 텍스트만, 중앙 정렬) */
.business-party-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.business-party-btn {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 2.85rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-black);
    color: var(--text-white);
    font-size: 0.86rem;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.4;
}

.business-party-btn:hover {
    border-color: var(--h2-blue);
}

.business-party-btn.is-selected {
    border-color: var(--h2-blue);
    background: rgba(26, 118, 210, 0.12);
    box-shadow: 0 0 0 1px var(--h2-blue);
}

.business-party-btn:focus-visible {
    outline: 2px solid var(--h2-blue);
    outline-offset: 2px;
}

/* 회원가입 — 회원권한 (제목 + 설명, 중앙 정렬) */
.authority-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.authority-btn {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    padding: 0.8rem 0.9rem;
    min-height: 3.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-black);
    color: var(--text-white);
    font-family: inherit;
    cursor: pointer;
    line-height: 1.45;
}

.authority-btn-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.authority-btn-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.authority-btn:hover {
    border-color: var(--h2-blue);
}

.authority-btn.is-selected {
    border-color: var(--h2-blue);
    background: rgba(26, 118, 210, 0.12);
    box-shadow: 0 0 0 1px var(--h2-blue);
}

.authority-btn.is-selected .authority-btn-desc {
    color: var(--text-white);
    opacity: 0.92;
}

.authority-btn:focus-visible {
    outline: 2px solid var(--h2-blue);
    outline-offset: 2px;
}

.authority-btn.is-disabled,
.authority-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--h2-blue);
}

.auth-form select:focus {
    outline: none;
    border-color: var(--h2-blue);
}

.auth-form input::placeholder {
    color: var(--go-gray);
}

.btn-full {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1.25rem;
    min-height: 3rem;
}

/* 반응형 */
@media (max-width: 768px) {
    .auth-checkbox-group {
        grid-template-columns: 1fr;
    }

    .business-party-group {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.nav-open {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-visual {
        display: none;
    }

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

    .card-actions {
        flex-direction: column;
    }
}

/* AI 챗봇 */
.chatbot-fab {
    position: fixed;
    right: 20px;
    bottom: 30px;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-pill);
    background: var(--h2-blue);
    color: #fff;
    border: 1px solid color-mix(in srgb, var(--h2-blue) 88%, #fff);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    z-index: 2500;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chatbot-fab:hover {
    background: var(--h2-blue-dark);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
}

.chatbot-panel {
    position: fixed;
    right: 20px;
    bottom: 88px;
    width: min(380px, calc(100vw - 40px));
    height: min(560px, calc(100vh - 140px));
    background: color-mix(in srgb, var(--bg-card) 96%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 2500;
    box-shadow: var(--shadow-card);
}

.chatbot-panel.open {
    display: flex;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-bottom: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--surface-soft) 65%, var(--bg-card));
}

.chatbot-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chatbot-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chatbot-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
}

.chatbot-close:hover {
    color: var(--text-white);
    background: var(--surface-soft);
}

.chatbot-messages {
    flex: 1;
    padding: 14px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatbot-bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.chatbot-bubble.user {
    align-self: flex-end;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.35);
}

.chatbot-bubble.assistant {
    align-self: flex-start;
    background: var(--surface-soft);
}

.chatbot-form {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--surface-soft) 55%, var(--bg-card));
}

.chatbot-input {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-black);
    color: var(--text-white);
    outline: none;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: var(--h2-blue);
}

.chatbot-send {
    padding: 0 14px;
    min-height: 2.65rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.18);
    color: var(--text-white);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.25;
    flex-shrink: 0;
}

.chatbot-send:hover {
    border-color: rgba(59, 130, 246, 0.65);
    background: rgba(59, 130, 246, 0.25);
}

.chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chatbot-status {
    padding: 0 12px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

