/* Auth Styles */

/* User Bar */
.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    padding-right: 60px; /* Space for settings gear */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #cbd5e1;
    font-size: 0.9rem;
    position: relative;
    z-index: 90;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#user-display-name {
    font-weight: 600;
    color: #1e293b;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-actions .btn-icon {
    background: transparent;
    border: none;
    color: #475569;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-actions .btn-icon:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e293b;
}

.user-actions .btn-icon svg {
    stroke: currentColor;
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1e293b;
}

/* Auth Modal */
.auth-modal {
    padding: 0;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    background: #f8fafc;
    color: #1e293b;
}

.auth-tab.active {
    color: #4f46e5;
    border-bottom: 2px solid #4f46e5;
    margin-bottom: -1px;
}

.auth-form {
    padding: 1.5rem;
}

.auth-form h2 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: #1e293b;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #94a3b8;
    font-size: 0.75rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    min-height: 1.2rem;
}

/* Remember Me Checkbox */
.form-checkbox {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4f46e5;
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Responsive */
@media (max-width: 480px) {
    .user-bar {
        padding: 0.4rem 0.75rem;
        padding-right: 55px; /* More space for gear on mobile */
    }

    .user-info {
        max-width: calc(100% - 80px);
        overflow: hidden;
    }

    #user-display-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .btn-small {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .auth-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .auth-form {
        padding: 1rem;
    }
}
