/* Osh Shell Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d0d1a;
    color: #c8d3f5;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    width: 100%;
    min-height: 0;
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
    margin-bottom: 1rem;
    position: relative;
    z-index: 9200; /* above all modals: vault (9100), connconf (9050), disclaimer (9000), dialing (8000) */
    background: #0d0d1a;
}

/* Light DOM fallback — visible until Go WASM shadow DOM takes over */
#header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
#header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #9d4edd;
    margin: 0;
}

#status {
    font-size: 0.875rem;
    color: #888;
    padding: 0.25rem 0.75rem;
    background: #1a1a2e;
    border-radius: 4px;
}

#terminal {
    flex: 1;
    min-height: 0;
    background: #0d0d1a;
    border-radius: 6px;
    overflow: hidden;
}

/* xterm.js overrides */
.xterm {
    padding: 0.5rem;
}

.xterm-viewport {
    overflow-y: auto !important;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#status.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ── Disclaimer modal ────────────────────────────────────────────────── */

.disclaimer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.disclaimer-backdrop--fading {
    animation: disclaimer-fade-out 0.25s ease forwards;
}

@keyframes disclaimer-fade-out {
    to { opacity: 0; }
}

.disclaimer-modal {
    background: #13132a;
    border: 1px solid #2a2a50;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: disclaimer-slide-in 0.2s ease;
}

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

.disclaimer-title {
    font-size: 1.25rem;
    color: #c8d3f5;
    margin: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #2a2a50;
}

.disclaimer-body {
    font-size: 0.88rem;
    color: #a0aac0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.disclaimer-affiliation {
    color: #c8d3f5;
    background: #1a1a3a;
    border-left: 3px solid #a9dc76;
    padding: 0.6rem 0.9rem;
    border-radius: 0 6px 6px 0;
    margin: 0;
}

.disclaimer-section-heading {
    font-size: 0.85rem;
    color: #7090c0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0.5rem 0 0;
}

.disclaimer-list {
    margin: 0;
    padding-left: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.disclaimer-list li strong { color: #c8d3f5; }

.disclaimer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2a2a50;
    flex-wrap: wrap;
}

.disclaimer-btn {
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.disclaimer-btn-deny {
    background: none;
    border-color: #444;
    color: #888;
}

.disclaimer-btn-deny:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.disclaimer-btn-accept {
    background: #1e3a5f;
    border-color: #4fa3e3;
    color: #4fa3e3;
}

.disclaimer-btn-accept:hover {
    background: #4fa3e3;
    color: #0d0d1a;
}

/* ── Dialing modal ───────────────────────────────────────────────────── */

.dialing-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000; /* below disclaimer (9000) */
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.dialing-backdrop--fading {
    animation: dialing-fade-out 0.4s ease forwards;
}

@keyframes dialing-fade-out {
    to { opacity: 0; }
}

.dialing-modal {
    background: #13132a;
    border: 1px solid #2a2a50;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    box-shadow:
        0 0 0 1px #1a1a3a,
        0 8px 40px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(157, 78, 221, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: dialing-slide-in 0.25s ease;
}

@keyframes dialing-slide-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dialing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialing-logo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #9d4edd;
    letter-spacing: 0.02em;
}


.dialing-box {
    background: #0d0d1a;
    border: 1px solid #2a2a50;
    border-radius: 6px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'Fira Code', 'Cascadia Code', 'Menlo', 'Courier New', monospace;
}

.dialing-box-title {
    font-size: 0.72rem;
    color: #7090c0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #1a1a3a;
}

.dialing-steps {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dialing-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.dialing-step--pending .dialing-step-icon { color: #2a2a50; }
.dialing-step--pending .dialing-step-text  { color: #3a3a60; }
.dialing-step--active  .dialing-step-icon  { color: #4fa3e3; }
.dialing-step--active  .dialing-step-text  { color: #c8d3f5; }
.dialing-step--done    .dialing-step-icon  { color: #4caf50; }
.dialing-step--done    .dialing-step-text  { color: #5a7a5a; }
.dialing-step--error   .dialing-step-icon  { color: #e74c3c; }
.dialing-step--error   .dialing-step-text  { color: #e74c3c; }

.dialing-step-icon {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.dialing-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dialing-progress-track {
    height: 5px;
    background: #1a1a3a;
    border-radius: 3px;
    overflow: hidden;
}

.dialing-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #9d4edd, #4fa3e3);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.dialing-progress-label {
    font-size: 0.72rem;
    color: #7090c0;
    text-align: right;
}

.dialing-cancel {
    display: block;
    margin: 0.75rem auto 0;
    background: none;
    border: 1px solid #444;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.35rem 1.2rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dialing-cancel:hover {
    background: #2a1a1a;
    border-color: #e74c3c;
    color: #e74c3c;
}

.dialing-backdrop--light {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: none !important;
}

.dialing-minimize {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    transition: color 0.15s;
}

.dialing-minimize:hover { color: #ccc; }

.dialing-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.dialing-action {
    background: none;
    border: 1px solid #4fa3e3;
    border-radius: 6px;
    color: #4fa3e3;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.35rem 1rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dialing-action:hover {
    background: #1e3a5f;
    color: #fff;
}

.dialing-action--danger {
    border-color: #e74c3c;
    color: #e74c3c;
}

.dialing-action--danger:hover {
    background: #3a1a1a;
    color: #ff6b6b;
}

.dialing-action--confirm {
    background: #e74c3c !important;
    border-color: #e74c3c !important;
    color: #fff !important;
    animation: dialing-confirm-pulse 0.4s ease;
}

@keyframes dialing-confirm-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

.dialing-circuit {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: #7090c0;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    line-height: 1.5;
    padding: 0.4rem 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.dialing-connected-flash {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #ecc94b;
    padding-top: 0.5rem;
    letter-spacing: 0.05em;
    animation: dialing-flash 0.35s ease;
}

@keyframes dialing-flash {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Connection config modal ─────────────────────────────────────────── */

.connconf-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9050; /* above header (9001), disclaimer (9000), dialing (8000) */
    padding: 1rem;
    backdrop-filter: blur(3px);
}

.connconf-backdrop--fading {
    animation: connconf-fade-out 0.3s ease forwards;
}

@keyframes connconf-fade-out {
    to { opacity: 0; }
}

.connconf-modal {
    background: #13132a;
    border: 1px solid #2a2a50;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: min(90vh, 90dvh);
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow:
        0 0 0 1px #1a1a3a,
        0 8px 40px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(157, 78, 221, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    animation: connconf-slide-in 0.22s ease;
}

@keyframes connconf-slide-in {
    from { opacity: 0; transform: translateY(-14px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.connconf-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.connconf-logo {
    font-size: 0.9rem;
    font-weight: 600;
    color: #9d4edd;
}

.connconf-title {
    font-size: 1rem;
    color: #c8d3f5;
    font-weight: 600;
}

/* ── Profile cards ───────────────────────────────────────────────────── */

/* The fieldset removes default browser styling */
.connconf-profiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    border: none;
    padding: 0;
    margin: 0;
}

.connconf-profiles-legend {
    /* Visually hidden — the modal title serves as the group label */
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The card is a <label> wrapping a hidden radio input.
   Clicking anywhere on the card (including child text) triggers the radio,
   which the browser guarantees is exclusive within the group. */
.connconf-card {
    background: #0d0d1a;
    border: 2px solid #2a2a50;
    border-radius: 8px;
    padding: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    user-select: none;
}

.connconf-card:hover { border-color: #555; background: #111128; }

/* Keyboard focus ring on the hidden radio bubbles up via :focus-within */
.connconf-card:focus-within { border-color: #9d4edd; outline: 2px solid rgba(157,78,221,0.4); outline-offset: 1px; }

/* Hide the native radio input visually — it's still focusable/interactive */
.connconf-card-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.connconf-card--selected {
    border-color: #9d4edd;
    background: #160e26;
}

.connconf-card-icon { font-size: 1.5rem; }

.connconf-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c8d3f5;
}

.connconf-card-note {
    font-size: 0.75rem;
    color: #7090c0;
    line-height: 1.4;
}

/* ── Advanced section ────────────────────────────────────────────────── */

.connconf-advanced {
    border: 1px solid #2a2a50;
    border-radius: 6px;
    overflow: hidden;
}

.connconf-advanced-summary {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #7090c0;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.connconf-advanced-summary::-webkit-details-marker { display: none; }
.connconf-advanced-summary::before { content: '▶ '; font-size: 0.65rem; }
.connconf-advanced[open] .connconf-advanced-summary::before { content: '▼ '; }

.connconf-adv-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid #2a2a50;
}

.connconf-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.connconf-label {
    font-size: 0.78rem;
    color: #7090c0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.connconf-select,
.connconf-input {
    background: #0d0d1a;
    border: 1px solid #333;
    border-radius: 5px;
    color: #c8d3f5;
    font-size: 0.82rem;
    font-family: inherit;
    padding: 0.35rem 0.55rem;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}

.connconf-select:focus,
.connconf-input:focus { border-color: #9d4edd; }

.connconf-textarea {
    background: #0d0d1a;
    border: 1px solid #333;
    border-radius: 5px;
    color: #c8d3f5;
    font-size: 0.78rem;
    font-family: 'Fira Code', 'Cascadia Code', monospace;
    padding: 0.35rem 0.55rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.15s;
    width: 100%;
}

.connconf-textarea:focus { border-color: #9d4edd; }

.connconf-rdv-note {
    font-size: 0.75rem;
    color: #5a7a5a;
    line-height: 1.4;
    min-height: 1.2em;
}

.connconf-sqs-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.connconf-amp-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.connconf-amp-warning {
    font-size: 0.78rem;
    color: #d4a017;
    background: rgba(212, 160, 23, 0.08);
    border: 1px solid rgba(212, 160, 23, 0.25);
    border-radius: 5px;
    padding: 0.5rem 0.7rem;
    line-height: 1.4;
}

.connconf-custom-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.connconf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #a0aac0;
    cursor: pointer;
}

.connconf-checkbox {
    accent-color: #4fa3e3;
}

/* ── Actions ─────────────────────────────────────────────────────────── */

.connconf-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.25rem;
    flex-wrap: wrap;
}

.connconf-btn {
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-size: 0.87rem;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.connconf-btn-cancel {
    background: none;
    border-color: #444;
    color: #888;
}

.connconf-btn-cancel:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.connconf-btn-connect {
    background: #1e3a5f;
    border-color: #4fa3e3;
    color: #4fa3e3;
}

.connconf-btn-connect:hover {
    background: #4fa3e3;
    color: #0d0d1a;
}

/* ── Language selector ───────────────────────────────────────────────── */

.lang-selector {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 6px;
    color: #c8d3f5;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.lang-selector:hover,
.lang-selector:focus { border-color: #555; }

.disclaimer-lang-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}

/* ── RTL layout adjustments ──────────────────────────────────────────── */

[dir=rtl] #header         { flex-direction: row-reverse; }
/* #header-controls RTL handled inside Go's shadow DOM via :host(.osh-rtl) */
[dir=rtl] .disclaimer-modal { text-align: right; }
[dir=rtl] .disclaimer-affiliation {
    border-left: none;
    border-right: 3px solid #a9dc76;
    border-radius: 6px 0 0 6px;
}
[dir=rtl] .disclaimer-list        { padding-left: 0; padding-right: 1.4rem; }
[dir=rtl] .disclaimer-actions     { justify-content: flex-start; }
[dir=rtl] .disclaimer-lang-wrap   { justify-content: flex-start; }

/* ── Tab bar ─────────────────────────────────────────────────────────── */

#tab-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #2a2a50;
    padding-bottom: 0.25rem;
}

.tab {
    background: none;
    border: 1px solid #2a2a50;
    border-radius: 6px 6px 0 0;
    color: #7090c0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.3rem 0.85rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tab:hover {
    background: #1a1a3a;
    color: #c8d3f5;
}

.tab.active {
    background: #1a1a3a;
    border-color: #9d4edd;
    color: #c8d3f5;
}

/* ── Browser panel ───────────────────────────────────────────────────── */

#browser-panel {
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 0;
}

#browser-urlbar {
    display: flex;
    gap: 0.4rem;
    padding: 0.35rem 0;
    flex-shrink: 0;
}

#browser-url-input {
    flex: 1;
    background: #0d0d1a;
    border: 1px solid #333;
    border-radius: 5px;
    color: #c8d3f5;
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    padding: 0.3rem 0.6rem;
    transition: border-color 0.15s;
}

#browser-url-input:focus { border-color: #9d4edd; }

#browser-go {
    background: #1e3a5f;
    border: 1px solid #4fa3e3;
    border-radius: 5px;
    color: #4fa3e3;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0.3rem 0.75rem;
    transition: background 0.15s, color 0.15s;
}

#browser-go:hover {
    background: #4fa3e3;
    color: #0d0d1a;
}

#ladybird-canvas {
    flex: 1;
    min-height: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: #fff;
    outline: none;
}

/* ── Footer ──────────────────────────────────────────────────────────── */

footer {
    color: #666;
    font-size: 0.8rem;
    padding: 0.5rem 0 0.25rem;
}

footer a,
footer a:visited,
footer a:hover,
footer a:active {
    color: #f0c040;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

/* Responsive */
@media (max-width: 768px) {
    #container {
        padding: 0.5rem;
    }

    #header-title { font-size: 1.25rem; }

    #terminal {
        min-height: 300px;
    }
}

/* ── Vault modal ────────────────────────────────────────────────────────── */

.vault-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    animation: vault-fade-in 0.2s ease-out;
}
.vault-backdrop--fading {
    animation: vault-fade-out 0.25s ease-in forwards;
}

@keyframes vault-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes vault-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.vault-modal {
    background: #13132a;
    border: 1px solid #2a2a50;
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 540px;
    width: 90vw;
    color: #c8d3f5;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    animation: vault-slide-in 0.22s ease-out;
}
@keyframes vault-slide-in {
    from { transform: translateY(-12px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.vault-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.vault-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #eee;
}
.vault-subtitle {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.vault-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 480px) {
    .vault-cols { grid-template-columns: 1fr; }
}

.vault-card {
    background: #1a1a2e;
    border: 1px solid #2a2a50;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.vault-card--anon {
    border-color: #2a5a3a;
}
.vault-card--vault {
    border-color: #3a2a5a;
}
.vault-card-icon {
    font-size: 1.5rem;
    text-align: center;
}
.vault-card-name {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    color: #eee;
}
.vault-card-note {
    font-size: 0.72rem;
    color: #888;
    line-height: 1.4;
    text-align: center;
}
.vault-card-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

/* Buttons */
.vault-btn {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #444;
    border-radius: 6px;
    background: #1a1a2e;
    color: #c8d3f5;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
}
.vault-btn:hover { border-color: #666; background: #222244; }
.vault-btn:disabled { opacity: 0.4; cursor: default; }
.vault-btn--green {
    background: #1a3a2a;
    border-color: #2a6a4a;
    color: #5af78e;
}
.vault-btn--green:hover { background: #1a4a32; border-color: #3a8a5a; }
.vault-btn--purple {
    background: #2a1a3e;
    border-color: #5a3a7a;
    color: #c084fc;
}
.vault-btn--purple:hover { background: #3a2a4e; border-color: #7a5a9a; }
.vault-btn--muted {
    color: #888;
    border-color: #333;
}
.vault-btn--muted:hover { color: #aaa; }
.vault-btn--small { font-size: 0.72rem; padding: 0.35rem 0.6rem; }
.vault-btn--danger-muted {
    color: #886666;
    border-color: #442222;
}
.vault-btn--danger-muted:hover { color: #aa6666; border-color: #663333; }
.vault-btn--danger {
    color: #ff5f57;
    border-color: #993333;
    background: #2a1a1a;
}
.vault-btn--disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* Form */
.vault-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #2a2a50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.vault-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.6rem;
    background: #0d0d1a;
    border: 1px solid #2a2a50;
    border-radius: 6px;
    color: #c8d3f5;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}
.vault-input:focus { border-color: #5a3a7a; }
.vault-input--shake {
    animation: vault-shake 0.35s ease-in-out;
}
@keyframes vault-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}
.vault-strength {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.vault-strength-bar {
    height: 4px;
    width: 0;
    border-radius: 2px;
    background: #555;
    transition: width 0.3s, background 0.3s;
    flex: 0 0 80px;
}
.vault-strength-label {
    font-size: 0.7rem;
    color: #888;
}
.vault-error {
    color: #ff5f57;
    font-size: 0.75rem;
}
.vault-webauthn-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.vault-webauthn-status {
    font-size: 0.72rem;
    color: #888;
}
.vault-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.vault-form-actions .vault-btn {
    width: auto;
}

/* End Session button is inside Go's shadow DOM — styled there */
