/* VurnChat — Telegram-inspired */

:root {
    --bg: #ffffff;
    --bg-sidebar: #f0f0f0;
    --bg-chat: #e8e8e8;
    --bg-input: #ffffff;
    --bg-bubble-sent: #effdde;
    --bg-bubble-recv: #ffffff;
    --bg-hover: #e4e4e4;
    --bg-active: #d4d4d4;
    --border: #d0d0d0;
    --border-light: #e0e0e0;
    --text: #111111;
    --text-secondary: #707070;
    --text-muted: #999999;
    --accent: #4a90d9;
    --accent-hover: #3a7bc8;
    --success: #34c759;
    --error: #ff3b30;
    --verified: #4a90d9;
    --radius: 6px;
    --radius-bubble: 10px;
    --sidebar-w: 260px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    min-height: 100vh;
}

/* ── Login screen ─────────────────────────────────────────────── */
.login-box {
    max-width: 360px;
    margin: 100px auto 0;
}

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.login-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 8px;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn:active {
    background: var(--bg-active);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-primary:active {
    background: #3270b0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-icon {
    padding: 4px 8px;
    font-size: 13px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-secondary);
    font-family: inherit;
    line-height: 1;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
}

.btn-copy:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    padding: 2px 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-danger {
    background: transparent;
    color: var(--error);
    border-color: var(--error);
}

.btn-danger:hover {
    background: var(--error);
    color: #fff;
    border-color: var(--error);
}

.reset-warning {
    padding: 12px;
    border: 1px solid #ffcccc;
    background: #fff5f5;
    border-radius: var(--radius);
    margin-top: 8px;
}

/* ── Inputs ───────────────────────────────────────────────────── */
.input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s;
    outline: none;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(74,144,217,0.15);
}

.input::placeholder {
    color: var(--text-muted);
}

/* ── Main layout: sidebar + chat ──────────────────────────────── */
.main-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
    position: relative;
    flex: none;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

/* ── Sidebar resize handle ───────────────────────────────────── */
.sidebar-resize-handle {
    position: absolute;
    right: -3px;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background 0.15s;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle:active {
    background: var(--accent);
    opacity: 0.25;
}

/* ── Back button (mobile) ────────────────────────────────────── */
.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.12s, transform 0.1s;
    margin-left: -6px;
}

.back-button:hover {
    background: var(--bg-hover);
}

.back-button:active {
    background: var(--bg-active);
    transform: scale(0.92);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

/* Add-contact form */
.add-contact-form {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #e8e8e8;
}

.add-contact-form .input {
    font-size: 12px;
    padding: 6px 10px;
}

/* Contact list */
.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.08s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item:hover {
    background: var(--bg-hover);
}

.contact-item.active {
    background: var(--accent);
    color: #fff;
}

.contact-item.active .contact-name {
    color: #fff;
}

.contact-item.active .contact-id {
    color: rgba(255,255,255,0.7);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5682a3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-item.active .contact-avatar {
    background: rgba(255,255,255,0.3);
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.verified-badge {
    color: var(--accent);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-item.active .verified-badge {
    color: rgba(255,255,255,0.9);
}

/* ── Chat panel ───────────────────────────────────────────────── */
.chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-chat);
    min-width: 0;
}

.chat-header {
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
}

.chat-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5682a3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-header-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.chat-header-sub {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-actions {
    display: flex;
    gap: 4px;
}

.chat-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    background: #fff;
}

/* ── Messages ─────────────────────────────────────────────────── */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
}

.message {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: var(--radius-bubble);
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
}

.message.sent {
    align-self: flex-end;
    background: var(--bg-bubble-sent);
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background: var(--bg-bubble-recv);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 4px;
}

.message .sender {
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 2px;
    font-weight: 500;
}

.message.error {
    align-self: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 8px;
    background: transparent;
}

/* ── Compose ──────────────────────────────────────────────────── */
.compose {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid var(--border);
    align-items: center;
}

.compose .input {
    flex: 1;
    padding: 9px 14px;
    border-radius: 20px;
    background: #f0f0f0;
    border: 1px solid transparent;
    font-size: 14px;
}

.compose .input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: none;
}

.compose-textarea {
    resize: none;
    min-height: 38px;
    max-height: 150px;
    overflow-y: auto;
    line-height: 1.4;
    font-family: var(--font);
    padding-top: 9px;
    padding-bottom: 9px;
    scrollbar-width: thin;
}

/* ── Mobile responsive ────────────────────────────────────────── */
@media (max-width: 767px) {
    .main-layout.mobile-view {
        position: relative;
        overflow: hidden;
    }

    .main-layout.mobile-view .sidebar {
        position: absolute;
        width: 100% !important;
        min-width: 100% !important;
        height: 100%;
        z-index: 1;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateX(0);
        border-right: none;
    }

    .main-layout.mobile-view.chat-active .sidebar {
        transform: translateX(-25%);
    }

    .main-layout.mobile-view .chat-panel {
        position: absolute;
        width: 100% !important;
        height: 100%;
        z-index: 2;
        transform: translateX(100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        left: 0;
        top: 0;
    }

    .main-layout.mobile-view.chat-active .chat-panel {
        transform: translateX(0);
    }

    .main-layout.mobile-view .sidebar-resize-handle {
        display: none !important;
    }

    .main-layout.mobile-view .contact-item {
        padding: 14px 16px;
    }

    .main-layout.mobile-view .contact-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .main-layout.mobile-view .sidebar-header {
        padding: 14px 16px;
        font-size: 16px;
    }

    .main-layout.mobile-view .sidebar-identity {
        padding: 12px 16px;
    }

    .main-layout.mobile-view .identity-avatar {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .main-layout.mobile-view .messages {
        padding: 12px 14px;
    }

    .main-layout.mobile-view .message {
        max-width: 85%;
    }

    .main-layout.mobile-view .compose {
        padding: 8px 10px;
    }

    .main-layout.mobile-view .modal {
        width: 95%;
        max-width: 95%;
        margin: 0 10px;
        padding: 20px 18px;
    }
}

/* ── Safety Numbers Modal ─────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.12s ease-out;
}

.modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    padding: 24px;
    max-width: 400px;
    width: 90%;
    animation: scaleIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.fingerprint {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    padding: 16px 12px;
    background: #f7f7f7;
    border-radius: 6px;
    word-break: break-all;
    line-height: 1.8;
    user-select: all;
    margin-bottom: 16px;
}

.verification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.verification-label {
    font-size: 13px;
    color: var(--text);
}

.verification-status {
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
}

.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    transition: background 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider {
    background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(18px);
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ── Sidebar identity section ────────────────────────────────── */
.sidebar-identity {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.08s;
}

.sidebar-identity:hover {
    background: #d6d6d6;
}

.identity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.identity-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: var(--font-mono);
}

/* ── Contact Info Modal ──────────────────────────────────────── */
.contact-info-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.contact-info-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5682a3, #3a6b8c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    box-shadow: 0 3px 10px rgba(74,144,217,0.25);
}

.contact-info-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.contact-info-pk {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.contact-info-section {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.contact-info-section:last-of-type {
    border-bottom: none;
}

.contact-info-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.contact-info-rename-row {
    display: flex;
    gap: 6px;
}

.contact-info-rename-row .input {
    flex: 1;
}

.contact-info-verify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    margin-top: 4px;
}

.chat-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 6px;
    margin: -4px -6px;
    transition: background 0.1s;
}

.chat-header-main:hover {
    background: var(--bg-hover);
}

/* ── Profile Modal ──────────────────────────────────────────── */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0 16px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5682a3, #3a6b8c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    box-shadow: 0 3px 12px rgba(74,144,217,0.25);
}

.profile-username {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.profile-section {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-section:last-of-type {
    border-bottom: none;
}

.profile-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-truncated {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 4px;
    user-select: all;
    margin-bottom: 6px;
    display: inline-block;
    letter-spacing: 0.3px;
}

.profile-username-row {
    display: flex;
    gap: 6px;
}

.profile-username-row .input {
    flex: 1;
}

.profile-username-status {
    font-size: 11px;
    color: var(--text-secondary);
    min-height: 16px;
    margin-top: 4px;
}

.profile-invite-btn {
    margin-top: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── Registration / Search modals ─────────────────────────────── */
.reg-status,
.search-status {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 18px;
    margin-top: 6px;
    margin-bottom: 6px;
}

.search-input-row,
.add-search-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.search-input-row .input,
.add-search-input-row .input {
    flex: 1;
}

.search-input-row .btn,
.add-search-input-row .btn {
    padding: 7px 12px;
    flex-shrink: 0;
}

/* ── Search result card ───────────────────────────────────────── */
.search-result-card {
    margin-top: 8px;
    padding: 14px;
    background: #f0f4f8;
    border-radius: 10px;
    border: 1px solid #d0dce8;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: scaleIn 0.15s ease-out;
}

.search-result-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5682a3, #3a6b8c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(74,144,217,0.2);
}

.search-result-body {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.search-result-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.search-result-add {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-add .input {
    font-size: 12px;
    padding: 6px 10px;
}

/* ── QR & Invite modal ────────────────────────────────────────── */
.qr-container {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
}

.qr-container svg {
    max-width: 200px;
    height: auto;
}

.invite-link-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #f7f7f7;
    border-radius: 4px;
    margin-bottom: 4px;
}

.invite-link-preview {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.invite-link-full {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    word-break: break-all;
    line-height: 1.4;
}

/* ── Invite paste section inside add-contact-form ─────────────── */
.invite-paste-section {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invite-paste-section .input {
    font-size: 11px;
    padding: 5px 8px;
}

/* ── Password field with SVG progress border ────────────────── */
.password-field-wrapper {
    position: relative;
    margin-bottom: 4px;
}

.password-border-svg {
    position: absolute;
    inset: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.password-field-wrapper .input {
    position: relative;
    z-index: 0;
}

.password-progress-path {
    transition: stroke-dashoffset 0.25s ease;
}

/* ── Password requirements list ──────────────────────────────── */
.password-requirements {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 10px;
    background: #f7f8fa;
    border-radius: var(--radius);
    border: 1px solid #e8eaed;
    animation: fadeIn 0.2s ease-out;
}

.req {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.25s ease;
    line-height: 1.4;
}

.req.met {
    color: var(--success);
}

.req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 11px;
    flex-shrink: 0;
}

.req.met .req-icon {
    font-weight: 600;
}

/* ── Password confirm field ─────────────────────────────────── */
.password-confirm-field {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, max-height 0.35s ease, margin-top 0.35s ease;
    margin-top: 0;
}

.password-confirm-field.visible {
    opacity: 1;
    max-height: 100px;
    pointer-events: auto;
    margin-top: 10px;
}

.password-match-status {
    font-size: 11px;
    margin-top: 4px;
    padding-left: 2px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.password-match-status.match {
    color: var(--success);
    font-weight: 500;
}

.password-match-status.mismatch {
    color: var(--error);
}


/* ── Reconnect banner ────────────────────────────────────────── */
.reconnect-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #fff3cd;
    color: #856404;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid #ffeeba;
    animation: fadeIn 0.2s ease-out;
    gap: 4px;
}

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
