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

h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--clr-accent, #50fa7b);
}

.mode-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.25rem;
    border-radius: 10px;
    border: 1px solid var(--clr-border, rgba(255, 255, 255, 0.1));
    margin-bottom: 1rem;
}

.mode-tab {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--clr-text-secondary, #a6adc8);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-tab:hover {
    color: var(--clr-text, #cdd6f4);
    background: rgba(255, 255, 255, 0.05);
}

.mode-tab.active {
    background: #45475a;
    color: #89b4fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.subtitle {
    color: var(--clr-text-secondary, #a6adc8);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.45;
}

.content {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.identity-profile-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tab-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tab-panel.hidden, .hidden {
    display: none !important;
}

.sso-buttons {
    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: #1e1e2e;
    color: #cdd6f4;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

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

.sso-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sso-btn:disabled:hover {
    transform: none;
    background: #1e1e2e;
    border-color: rgba(255, 255, 255, 0.15);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 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 {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--clr-text-secondary, #a6adc8);
}

.text-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #11111b;
    color: #cdd6f4;
    font-size: 0.95rem;
    box-sizing: border-box;
}

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

.action-row {
    margin-top: 0.5rem;
    width: 100%;
}

.action-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #50fa7b, #40c767);
    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.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.action-btn:disabled:hover {
    transform: none;
    opacity: 0.4;
}

.status-area {
    margin-top: 0.5rem;
}

.result-area {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--clr-border, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-md, 8px);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.address-label {
    font-size: 0.8rem;
    color: var(--clr-text-secondary, #a6adc8);
    margin: 0;
}

.warning {
    font-size: 0.8rem;
    color: var(--clr-warn, #f38ba8);
    margin: 0.5rem 0 0;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    opacity: 1;
}

.public-directory-notice {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(137, 180, 250, 0.08);
    border: 1px solid rgba(137, 180, 250, 0.25);
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    text-align: left;
}

.notice-icon {
    font-size: 1.1rem;
    line-height: 1.2;
}

.notice-body {
    font-size: 0.82rem;
    color: var(--clr-text, #cdd6f4);
    line-height: 1.45;
}

.notice-body strong {
    color: #89b4fa;
}

.handle-badge {
    font-size: 0.78rem;
    font-weight: 600;
}

.handle-badge.available {
    color: #a6e3a1;
}

.handle-badge.unavailable {
    color: #f38ba8;
}

.handle-badge.checking {
    color: #89b4fa;
}

.handle-badge.exception-needed {
    color: #f9e2af;
}