:host {
    display: block;
    width: 100%;
    margin: 1rem auto;
}

.component-container {
    padding: 1.75rem;
    background: var(--ibgib-bg-surface, #1e1e2e);
    color: var(--ibgib-text-primary, #cdd6f4);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hidden {
    display: none !important;
}

.sso-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.8rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: #181825;
    color: #cdd6f4;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.sso-btn:hover {
    transform: translateY(-1px);
    background: #313244;
    border-color: #89b4fa;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0;
    color: #a6adc8;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
    padding: 0 0.75rem;
}

.input-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ibgib-text-secondary, #a6adc8);
}

.text-input,
.secret-input {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--ibgib-border-color, #45475a);
    background: var(--ibgib-bg-input, #11111b);
    color: var(--ibgib-text-primary, #cdd6f4);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus,
.secret-input:focus {
    border-color: var(--ibgib-accent-color, #89b4fa);
    box-shadow: 0 0 0 2px rgba(137, 180, 250, 0.2);
}

.text-input.invalid,
.secret-input.invalid {
    border-color: #f38ba8;
    box-shadow: 0 0 0 2px rgba(243, 139, 168, 0.2);
}

.action-row {
    margin-top: 1rem;
}

.action-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #89b4fa, #74c7ec);
    color: #11111b;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

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

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

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.status-area {
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.status-area.info {
    background: rgba(137, 180, 250, 0.15);
    border: 1px solid #89b4fa;
    color: #89b4fa;
}

.status-area.error {
    background: rgba(243, 139, 168, 0.15);
    border: 1px solid #f38ba8;
    color: #f38ba8;
}

.status-area.success {
    background: rgba(166, 227, 161, 0.15);
    border: 1px solid #a6e3a1;
    color: #a6e3a1;
}

.status-msg {
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.result-area {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(166, 227, 161, 0.08);
    border: 1px solid #a6e3a1;
    border-radius: 8px;
}

.result-area.collapsed {
    display: none;
}

.result-area h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #a6e3a1;
    font-size: 1.15rem;
}

.address-label {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--ibgib-text-secondary, #a6adc8);
}

.keystone-addr {
    display: block;
    padding: 0.5rem 0.75rem;
    background: #11111b;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #f9e2af;
    word-break: break-all;
    margin-bottom: 0.75rem;
}

.warning {
    margin: 0;
    font-size: 0.85rem;
    color: #a6adc8;
}