.user-select-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.25rem;
}

.user-select-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 520px;
    width: 100%;
    box-sizing: border-box;
}

.user-select-header {
    text-align: center;
    margin-bottom: 2rem;
}

.user-select-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.user-select-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.user-select-header p {
    color: var(--text-muted);
    margin: 0;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.user-card {
    background: rgba(99, 102, 241, 0.05);
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    text-align: left;
    font: inherit;
    appearance: none;
}

.user-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.user-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.user-id {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.new-user-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.new-user-input {
    flex: 1 1 220px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    min-width: 0;
    box-sizing: border-box;
}

.new-user-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-create {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    flex: 0 1 auto;
    max-width: 100%;
    box-sizing: border-box;
}

.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.error-message {
    color: #c00;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-overlay.open {
    display: flex;
}

.pin-modal {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

.pin-modal h3 {
    margin: 0 0 0.25rem 0;
}

.pin-subtitle {
    margin: 0 0 1rem 0;
    color: var(--text-muted);
}

.pin-input {
    width: 100%;
    padding: 0.85rem;
    font-size: 1.15rem;
    text-align: center;
    letter-spacing: 0.4rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #f8f9ff;
    outline: none;
}

.pin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-secondary {
    background: #f3f4ff;
    color: var(--text-color);
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.pin-error {
    color: #c00;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.new-pin-input {
    max-width: 140px;
}

@media (max-width: 640px) {
    .user-select-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    .user-select-header h1 {
        font-size: 1.6rem;
    }
    .user-select-header p {
        font-size: 0.95rem;
    }
    .user-list {
        max-height: none;
    }
    .user-card {
        padding: 0.9rem 1rem;
        gap: 0.75rem;
    }
    .user-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    .new-user-form {
        flex-direction: column;
        gap: 0.6rem;
    }
    .btn-create {
        width: 100%;
        text-align: center;
    }
    .new-pin-input {
        max-width: none;
        width: 100%;
    }
}
